broad-battery-31188
01/20/2022, 4:09 PMsquare-activity-64562
01/20/2022, 4:18 PMsquare-activity-64562
01/20/2022, 4:19 PMsquare-activity-64562
01/20/2022, 4:21 PMbroad-battery-31188
01/21/2022, 2:49 PMsquare-activity-64562
01/21/2022, 2:57 PMbroad-battery-31188
01/21/2022, 6:01 PMimported privileges access to only internal SNOWFLAKE DB. I am getting following error.
grant imported privileges on database snowflake to role datahub_role;
[2022-01-21 16:01:50,718] WARNING {datahub.ingestion.source.sql.snowflake:181} - Extracting lineage from Snowflake failed.Please check your premissions. Continuing...
Error was (snowflake.connector.errors.ProgrammingError) 000904 (42000): SQL compilation error: error line 13 at position 33
invalid identifier 'T.OBJECTS_MODIFIED'
[SQL:
WITH table_lineage_history AS (
SELECT
r.value:"objectName" AS upstream_table_name,
r.value:"objectDomain" AS upstream_table_domain,
r.value:"columns" AS upstream_table_columns,
w.value:"objectName" AS downstream_table_name,
w.value:"objectDomain" AS downstream_table_domain,
w.value:"columns" AS downstream_table_columns,
t.query_start_time AS query_start_time
FROM
(SELECT * from snowflake.account_usage.access_history) t,
lateral flatten(input => t.BASE_OBJECTS_ACCESSED) r,
lateral flatten(input => t.OBJECTS_MODIFIED) w
WHERE r.value:"objectId" IS NOT NULL
AND w.value:"objectId" IS NOT NULL
AND w.value:"objectName" NOT LIKE '%.GE_TMP_%'
AND t.query_start_time >= to_timestamp_ltz(1642636800000, 3)
AND t.query_start_time < to_timestamp_ltz(1642723200000, 3))
SELECT upstream_table_name, downstream_table_name, upstream_table_columns, downstream_table_columns
FROM table_lineage_history
WHERE upstream_table_domain = 'Table' and downstream_table_domain = 'Table'
QUALIFY ROW_NUMBER() OVER (PARTITION BY downstream_table_name, upstream_table_name ORDER BY query_start_time DESC) = 1 ]broad-battery-31188
01/21/2022, 6:03 PMOBJECTS_MODIFIED column does not exist in our DB. I think It’s only included in preview feature.
This behavior change is included in the 2021_10 bundle introduced in the Snowflake 5.40 release. The bundle is disabled by default in 5.40, but can be enabled for testing purposes.
The bundle is planned to be enabled by default in January 2022; however, the date is subject to change.
https://community.snowflake.com/s/article/Pending-Behavior-Change-Logsquare-activity-64562
01/24/2022, 9:09 AMbroad-battery-31188
01/27/2022, 4:37 PM