最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

IDs for objects to create an object chain mapping in Snowflake - Stack Overflow

programmeradmin1浏览0评论

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 badges
Add a comment  | 

1 Answer 1

Reset to default 1

Internal 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;
发布评论

评论列表(0)

  1. 暂无评论