TLDR: where are the procedure_id, view_id, and table_id?
Long version: I'm trying to create object chain mapping for a business development application. I need to specify objects in a stream of actions so we can map out which objects are being used, which aren't, and I need a way to identify objects that are being used by multiple other objects. Sort of an "impacts map" or something.
I was visualizing a parent/child keystore where object ID could be used but was dismayed to find that information_schema didn't return that for procedures, tables, or views. I've done a little digging and all I can find is query_ids which doesn't help.
Maybe I can make my own clustered index or something, but I really don't want to reinvent something that's probably already there under the hood.
TLDR: where are the procedure_id, view_id, and table_id?
Long version: I'm trying to create object chain mapping for a business development application. I need to specify objects in a stream of actions so we can map out which objects are being used, which aren't, and I need a way to identify objects that are being used by multiple other objects. Sort of an "impacts map" or something.
I was visualizing a parent/child keystore where object ID could be used but was dismayed to find that information_schema didn't return that for procedures, tables, or views. I've done a little digging and all I can find is query_ids which doesn't help.
Maybe I can make my own clustered index or something, but I really don't want to reinvent something that's probably already there under the hood.
Share Improve this question asked Jan 19 at 4:37 n8.n8. 1,7383 gold badges16 silver badges41 bronze badges1 Answer
Reset to default 1Internal system identifiers can be found inside SNOWFLAKE.ACCOUNT_USAGE views:
- VIEWS view
- TABLES view
- FUNCTIONS view
TABLE_ID - NUMBER - Internal, Snowflake-generated identifier for the table.
Example:
SELECT TABLE_ID, TABLE_SCHEMA_ID, TABLE_CATALOG_ID
FROM SNOWFLAKE.ACCOUNT_USAGE.TABLES
WHERE deleted IS NULL;