Dwh.dev documentation
  • What is Dwh.dev?
  • Features
    • Data catalog
      • PIPEs
      • Fancy SQL Highlight
    • Data Lineage
      • Object-level lineage
      • Column-level Lineage
      • In-query lineage
      • Navigation
      • JOIN and WHERE
      • Equals column lineage
      • Strong and Weak dependencies
      • Default and Virtual Columns
      • Implicit Types casting
      • Circle dependencies
      • Argument forwarding
    • TASKs
  • Integrations
    • Snowflake
      • Offline mode
      • Secured online mode
      • Snowflake Marketplace
    • DBT
    • ETL
    • BI
      • Looker
      • Other
    • API
  • Snowflake SQL Syntax and Behavior
    • Identifiers
    • Reusing column aliases
    • SELECT * ILIKE EXCLUDE REPLACE RENAME
    • Scalar functions name resolution special behavior
    • Functions overloading
    • CTE as an expression alias
    • ASOF Join
    • UDF named arguments
    • Objects auto renaming
    • Columns auto renaming
Powered by GitBook
On this page

Was this helpful?

  1. Integrations
  2. Snowflake

Offline mode

PreviousSnowflakeNextSecured online mode

Last updated 8 months ago

Was this helpful?

allows you to work without a direct connection to your Snowflake instance.

Typically, data lineage tools require information from the INFORMATION_SCHEMA, which is only accessible through a direct connection to your account.

However, we independently compile the schema into an intermediate representation, requiring only the file with DDL statements. This opens up several possibilities:

  • You can explore the lineage of only the part of the database that is available to you, without going through all the security procedures adopted in your company when creating a user for a direct connection.

  • You can explore the lineage of a database to which you do not have access, but there is a schema description.

  • You can upload schema descriptions for multiple databases at once.

To use offline mode, execute the following SQL query in your account:

SELECT GET_DDL('database', '<dbname>', TRUE);

and upload the result to .

However, this approach has some downsides:

  1. Not all objects of interest can be obtained with this command, and some objects are returned incorrectly. For example, if a STREAM is created for an object from another schema, GET_DDL will return an error description. We recommend enriching the results of the GET_DDL function with additional functions from our collection:

  2. The commands in the results of the GET_DDL function are sorted in alphabetical order of object names. For example, if VIEW v1 depends on VIEW v2, you won't be able to run the resulting set of statements without errors. The good news is that we can topologically sort DDL statements before compilation. When uploading the file, specify that you are uploading the result of the GET_DDL function, and we will take care of the rest :)

You can also upload files with sets of DML and DDL statements describing your PIPELINES. You can retrieve them from QUERY_HISTORY if you do not store them separately.

If you have sets of SELECT statements describing BI REPORTS, you can also upload them yourself.

We will also include information about relationships and objects from these files in the overall lineage and catalog.

Dwh.dev
Dwh.dev
https://github.com/dwh-dev/snowflake-get-ddl-tools