witty-butcher-82399
10/18/2021, 2:15 PMprofile
feature, I got the following error: Cannot perform CREATE TEMPTABLE. This session does not have a current schema. Call 'USE SCHEMA', or use a qualified name.
Have you got this error before? Is there any way I could set which is the schema to be used for the profiler when creating the temporary tables?
• When using the snowflake-usage
connector, I got the error below.
"Failed to parse usage line {'query_start_time': datetime.datetime(2021, 10, 17, 3, 41, 14, 560000, "
'tzinfo=datetime.timezone.utc), \'query_text\': "create temporary table '
'avalanche.dwh_stage_iad.accepted_values_stg_ad_images_source_system__IAD__tmp as\\n select '
'test_run_start_ts,\\n row_count,\\n failure_row_count,\\n case when failure_row_count > '
"0\\n then 'ERROR'\\n else 'PASS'\\n end as test_status\\n from "
'(\\n select current_timestamp as test_run_start_ts,\\n count_all_sql.row_count,\\n '
'case when count_all_sql.row_count > 0 \\n then (\\n -- begin of data test '
'query\\n select count(1) as row_count\\n from avalanche.dwh_stage_iad.stg_ad_images as '
"model\\n \\n where (\\n source_system not in ('IAD')\\n "
')\\n -- and of data test query\\n )\\n else '
'0\\n end as failure_row_count\\n from (\\n -- begin of count all '
'query\\n select count(1) as row_count\\n from avalanche.dwh_stage_iad.stg_ad_images as model\\n '
'\\n -- end of count all query\\n ) as count_all_sql\\n );", \'query_type\': '
"'CREATE_TABLE_AS_SELECT', 'base_objects_accessed': [{'columns': [{'columnId': 82388016, 'columnName': 'SOURCE_SYSTEM'}], "
"'objectDomain': 'Table', 'objectId': 19718154, 'objectName': 'AVALANCHE.DWH_STAGE_IAD.STG_AD_IMAGES'}], 'user_name': "
"'SERVICE_AVALANCHE', 'first_name': 'Avalanche', 'last_name': 'Service Account', 'display_name': 'SERVICE_AVALANCHE', "
"'email': None, 'role_name': 'SERVICE_DBT'}",
• Also, regarding the snowflake-usage
connector, it called my attention that it is handled as an independent connector instead of just a property on the snowflake
connector. Because of that, while I can filter (`allow`/`deny`) tables and schemas with the snowflake
connector, I can’t with the snowflake-usage
one. This results in snowflake-usage
producing events for tables that I don’t want to be in the catalog. Any reason why this split of the connector? Or how can I keep both connectors aligned on which tables being processed?
Thanks in advance!helpful-optician-78938
10/18/2021, 6:40 PMaccountadmin
, can you try with this role?witty-butcher-82399
10/18/2021, 7:01 PMDESCRIBE USER
I found that default role is META_DATA_READER
and no secondary roles. Not sure if META_DATA_READER
is a custom role or what; Snowflake instance is managed by a different team.
When setting up a connector, we try to avoid requesting users with broad permissions… and accountadmin
sounds like that, am I wrong?helpful-optician-78938
10/19/2021, 7:03 PMwitty-butcher-82399
10/20/2021, 5:02 AMwitty-butcher-82399
10/20/2021, 9:20 AMhelpful-optician-78938
10/20/2021, 6:17 PMpurple-ghost-64569
03/30/2022, 7:57 PMprofiling.bigquery_temp_table_schema
but not for Snowflake, as it seems :-(purple-ghost-64569
03/30/2022, 7:58 PMDEFAULT_NAMESPACE
for the user that we use for DataHub, but it doesn't seem to have any effect.