3 0
Read Time:1 Minute, 33 Second

Continuing my exploration of Streamlit, let’s delve into another Streamlit app today that focuses on exporting the Data Definition Language (DDL) of Snowflake objects. Although there isn’t a particular use case driving this exploration, my curiosity led me to develop code for exporting the DDL of both Tables and Stored Procedures. This app will showcase the available databases in my account. When you select a database, it prompts you to choose the corresponding schema within that database. Once Schema is selected it will ask you to select either TABLE or PROCEDURE for whom you want to export the DDL.

Depending on the chosen entity type, the app will showcase objects within that category. For example, selecting “table” will reveal a list of tables present in that schema. Upon selecting a specific table, the app will promptly generate its Data Definition Language (DDL). Similarly, choosing “procedure” will display a list of procedures, enabling the user to make a selection.

In my ongoing exploration of the app, I also experimented with the Streamlit sidebar feature. This sidebar comes into play if users desire the Data Definition Language (DDL) of all procedures in one go. Instead of manually selecting each procedure, users can utilize this feature to export the DDL of all procedures. The sidebar aligns with the database selected in the main application, ensuring a comprehensive export of DDL for all procedures associated with that database.

Note:  I acknowledge that this may represent a basic use case with ample room for improvement and suggestions. Parallel I’m excited to share my learning and understanding. I welcome any suggestions and feedback that can help enhance and deepen my comprehension of the subject.

Export DDL

Credit goes to various open blogs authored by experts in Streamlit. I consulted multiple sources, and as such, I’m unable to specify names.

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

2 thoughts on “Streamlit App: Export DDL

Leave a Reply

Your email address will not be published. Required fields are marked *