(no title)
antonrevyako | 4 years ago
For example:
CREATE TABLE B (ID INT PRIMARY KEY); CREATE TABLE A (ID INT REFERENCES B (ID)); SELECT GET_DDL ('DATABASE', 'TEST', TRUE); will return
create or replace TABLE TEST.PUBLIC.A ( ID NUMBER (38,0), foreign key (ID) references TEST.PUBLIC.B (ID) ); create or replace TABLE TEST.PUBLIC.B ( ID NUMBER (38,0) NOT NULL, primary key (ID) ); Such DDL script could not be executed due to the wrong order of the objects.
This tool that will reorder objects based on their relatedness.
Applicable to all Snowflake objects (including VIEW), supports CREATE and ALTER, and respects FOREIGN KEYS, CLONE, SELECT AS, and other kinds of dependencies. Knows how to identify cyclical dependencies.
This tool also available to use in our API: https://docs.parsers.dev/#snowflake-get_ddl-function-result-...
No comments yet.