top of page

How to export DDL from Snowflake objects using the SnowHub command line interface (CLI)

Updated: Apr 17

SnowHub is a modern solution to facilitate the development for Snowflake Data Warehouse.


You can utilize the SnowHub.cloud SAAS following the instructions on How to generate DDL for Snowflake tables directly to GitHub using SnowHub.


You can also utilize the plugin to export the DDLs using Command Line Interface (CLI) for Windows, macOS or Unix OS following these instructions:


Download the free SnowHub CLI (Contact our support team at contact@brfconsulting.com).


After installing the Gradle Plugin you will need to setup the build.gradle file:


username = 'your snowflake username'

password = 'password'

account = 'your snowflake account'

role = 'your snowflake security role'

warehouse = 'your snowflake warehouse'

database = 'your snowflake database'

schema = 'your snowflake schema'

From your computer terminal type gradle tasks to show all the commands to export Tables, Views, or any other operations you wish to execute:

Once configured, SnowHub CLI is ready to be executed.


Run the command gradle export -Si to export the tables and views:

You should get a message about the files being generated:

If successful you should get a message like this:

A separate .sql file is generated with the DDL for each exported table:

Conclusion: SnowHub has a CLI which can be used to export DDLs from Snowflake to your computer or a server. Once the DDLs are exported they can simply be versioned into any git tool such as GitHub, BitBucket or any other version control tool.


Fore more details visit www.SnowHub.cloud or contact the development team at contact@brfconsulting.com.


261 views0 comments

Recent Posts

See All
bottom of page