Configuration Files

We will use .yaml files to help with configuring the app for the local environment.

sql_config.yaml

use sql: for the root.

Then add the environment names you would like to define, in this case I defined an environment for dev, and prod.

Next define the SQL_Driver connection string.


streamlit_config.yaml

Used for configuration options for Streamlit UI elements.

The select box, allows for showing # of rows per page. It will paginate the data shown in the data_editor widgets.


sql_column_config.yaml

The configuration file defines what tables and what columns you wish to return to the user.

There are two base groups, table and info.

The table group specifies which tables the user can modify. The key is that the name of the table, needs to match the file placed in the query directory.

For our example we allow the user to update the production.location table. Therefore there needs to be a corresponding file in the / query directory, labeled query / production.location.sql

In the second base group there are two informational queries. info.columns, which is used to return the meta data from the database. And the second query sys.row_count which is used to look at the sys tables and get the row count of files.

On the next page, we will review the example query files.