Dependency management

SnowDDL dependency management system is simple and straightforward.

Dependencies across different object types

There is NO NEED for dependency management across different object types. All object types are resolved sequentially in order described in Object types guide. It means:

  • all views are created after all tables

  • all tables are created after all schemas

  • all schemas created after all databases

  • etc.

If one object type relies on another object type (for example, EXTERNAL_TABLE relies on FILE_FORMAT), you may assume that it will be available.

Dependencies across the same object type

Sometimes objects of the same type depend on each other. In this case an explicit dependency must be added to make sure that objects will be created in the right order.

Currently the following object types support explicit dependencies:

  • TASKS - property after is a reference to another task;

  • VIEWS - property depends_on is a reference to another view;

In future dependency management for FUNCTIONS and PROCEDURES might be added, if it becomes necessary.

You may have any number of "levels" of dependencies.

If dependency could not be resolved (e.g. ref object was removed from config or renamed), SnowDDL will try to process such object anyway, so you'll have a chance to see an SQL error.

Last updated