fix(ingest/snowflake): set use_quoted_name to profile lowercase tables (#8168)

Co-authored-by: Tamas Nemeth <treff7es@gmail.com>
This commit is contained in:
Mayuri Nehate 2023-06-06 18:10:58 +05:30 committed by GitHub
parent 279f9eb455
commit 9fc1ef0111
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -147,7 +147,14 @@ class SnowflakeProfiler(GenericProfiler, SnowflakeCommonMixin):
logger.debug(f"Preparing profiling request for {dataset_name}") logger.debug(f"Preparing profiling request for {dataset_name}")
profile_request = SnowflakeProfilerRequest( profile_request = SnowflakeProfilerRequest(
pretty_name=dataset_name, pretty_name=dataset_name,
batch_kwargs=dict(schema=schema_name, table=table.name), batch_kwargs=dict(
schema=schema_name,
table=table.name,
# Lowercase/Mixedcase table names in Snowflake do not work by default.
# We need to pass `use_quoted_name=True` for such tables as mentioned here -
# https://github.com/great-expectations/great_expectations/pull/2023
use_quoted_name=(table.name != table.name.upper()),
),
table=table, table=table,
profile_table_level_only=profile_table_level_only, profile_table_level_only=profile_table_level_only,
) )