Reputation: 7977
We use snowflake at work to store data, and for one of the tables, I dont have the SQL query used to create the table. Is there a way to see the query used to make that table?
I tried using the following
get_ddl('table', 'db.table', true)
but this gives me an output like-
This doesnt give me any information about the sql query that was used. How do I get that in snowflake?
Upvotes: 0
Views: 1232
Reputation: 2622
If get_ddl() is not enough you may use INFORMATION_SCHEMA. To get more information you have 2 options:
If you use the funtions/view above and filter all the records by QUERY_TEXT, maybe you get more information about the exact SQL that was used to create your table.
Upvotes: 2