InvalidOperation GetMetadata Error While Scanning Snowflake in Microsoft Purview
Max Harper
0
Reputation points
When scanning a Snowflake database for Microsoft Purview using Scan Level Auto-Detect, an invalidOperation
error occurs for tables. The error is specifically related to the GetMetaData operation. The following query returns no results when attempting to scan my TEST_TABLE in the TEST schema:
SELECT T.TABLE_CATALOG, T.TABLE_SCHEMA, T.TABLE_NAME, T.TABLE_TYPE, T.COMMENT, V.IS_SECURE, T.LAST_ALTERED
FROM INFORMATION_SCHEMA.TABLES T
LEFT OUTER JOIN INFORMATION_SCHEMA.VIEWS V ON (T.TABLE_CATALOG=V.TABLE_CATALOG AND T.TABLE_SCHEMA=V.TABLE_SCHEMA AND T.TABLE_NAME=V.TABLE_NAME)
WHERE T.TABLE_TYPE IN ('BASE TABLE') AND T.TABLE_NAME ='null' AND T.TABLE_SCHEMA ='TEST'.
The issue appears to be that the automated query incorrectly uses T.TABLE_NAME ='null'
, which results in an empty query. Is the automated query supposed to have the 'null' as TEST_TABLE, if not, how do I fix this problem?
Sign in to answer