how to extract snowflake tables schema and store-procedures using python script?

920 Views Asked by At

I'm intermediate with python and beginner with snowflakes.

Here i'm able to connect snowflakes and fetch table data.

But main problem is to extract tables schema and store-procedures from snowflakes using python script.

thanks in advance.

1

There are 1 best solutions below

0
Rajib Deb On

Use the get_ddl feature of snowflake as shown below to get the table schema enter image description here

And use SHOW PROCEDURES to get the procedures

You can see the below python package to find out how you can run the above queries through python

https://github.com/Infosys/Snowflake-Python-Development-Framework

look at the execute_snowquery function