Move Top Level Imports (#12145)

This commit is contained in:
Ayush Shah 2023-06-26 11:54:25 +05:30 committed by GitHub
parent a3fd6e9522
commit 29d3de2520
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -16,8 +16,6 @@ from Csv and Tsv file formats
from functools import singledispatch
from typing import Any
import pandas as pd
from metadata.generated.schema.entity.services.connections.database.datalake.azureConfig import (
AzureConfig,
)
@ -42,6 +40,8 @@ CSV_SEPARATOR = ","
def read_from_pandas(path: str, separator: str, storage_options=None):
import pandas as pd # pylint: disable=import-outside-toplevel
chunk_list = []
with pd.read_csv(
path, sep=separator, chunksize=CHUNKSIZE, storage_options=storage_options

View File

@ -18,8 +18,6 @@ from Parquet file formats
from functools import singledispatch
from typing import Any
import pandas as pd
from metadata.generated.schema.entity.services.connections.database.datalake.azureConfig import (
AzureConfig,
)
@ -95,6 +93,8 @@ def _(_: S3Config, key: str, bucket_name: str, connection_kwargs, **kwargs):
@read_parquet_dispatch.register
def _(config_source: AzureConfig, key: str, bucket_name: str, **kwargs):
import pandas as pd # pylint: disable=import-outside-toplevel
storage_options = return_azure_storage_options(config_source)
account_url = AZURE_PATH.format(
bucket_name=bucket_name,