mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-26 09:22:14 +00:00
Move Top Level Imports (#12145)
This commit is contained in:
parent
a3fd6e9522
commit
29d3de2520
@ -16,8 +16,6 @@ from Csv and Tsv file formats
|
|||||||
from functools import singledispatch
|
from functools import singledispatch
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
import pandas as pd
|
|
||||||
|
|
||||||
from metadata.generated.schema.entity.services.connections.database.datalake.azureConfig import (
|
from metadata.generated.schema.entity.services.connections.database.datalake.azureConfig import (
|
||||||
AzureConfig,
|
AzureConfig,
|
||||||
)
|
)
|
||||||
@ -42,6 +40,8 @@ CSV_SEPARATOR = ","
|
|||||||
|
|
||||||
|
|
||||||
def read_from_pandas(path: str, separator: str, storage_options=None):
|
def read_from_pandas(path: str, separator: str, storage_options=None):
|
||||||
|
import pandas as pd # pylint: disable=import-outside-toplevel
|
||||||
|
|
||||||
chunk_list = []
|
chunk_list = []
|
||||||
with pd.read_csv(
|
with pd.read_csv(
|
||||||
path, sep=separator, chunksize=CHUNKSIZE, storage_options=storage_options
|
path, sep=separator, chunksize=CHUNKSIZE, storage_options=storage_options
|
||||||
|
@ -18,8 +18,6 @@ from Parquet file formats
|
|||||||
from functools import singledispatch
|
from functools import singledispatch
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
import pandas as pd
|
|
||||||
|
|
||||||
from metadata.generated.schema.entity.services.connections.database.datalake.azureConfig import (
|
from metadata.generated.schema.entity.services.connections.database.datalake.azureConfig import (
|
||||||
AzureConfig,
|
AzureConfig,
|
||||||
)
|
)
|
||||||
@ -95,6 +93,8 @@ def _(_: S3Config, key: str, bucket_name: str, connection_kwargs, **kwargs):
|
|||||||
|
|
||||||
@read_parquet_dispatch.register
|
@read_parquet_dispatch.register
|
||||||
def _(config_source: AzureConfig, key: str, bucket_name: str, **kwargs):
|
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)
|
storage_options = return_azure_storage_options(config_source)
|
||||||
account_url = AZURE_PATH.format(
|
account_url = AZURE_PATH.format(
|
||||||
bucket_name=bucket_name,
|
bucket_name=bucket_name,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user