Skip to content

Create Streamlit Application

Step 1: Generate Snowflake PAT Token

  1. Follow the instructions in the official Snowflake documentation: 👉 Generate a PAT Token
  2. Save this PAT token — you’ll need it later during configuration.

Step 2: Create Streamlit Application in Snowflake

  1. In your Snowflake account, open the left-hand navigation menu and click on Streamlit under Projects.
  2. Click on the Streamlit App button (top right).
  3. In the dialog:

  4. Set Database to sales_intelligence

  5. Set Schema to data
  6. Choose your Warehouse
  7. Click Create

Note: Ensure the database and schema match those used in the setup.

Step 3: Configure the Streamlit Application

  1. Click on the Packages dropdown in the top-left corner. In the search field that appears, enter the following package names one by one and press Enter after each to install them into your environment:

    • urllib3
    • cryptography
    • posthog
    • requests
    • pyjwt
    • jproperties
  2. Copy the contents from streamlit.py from the github repository and paste it into your new Streamlit App.

  3. Replace the placeholders in the code with your actual values:

    • <your-trust3-server-base-url> - Trust3 Native App Endpoint (e.g., https://abcde-gk76548-demo.snowflakecomputing.app)
    • <your-snowflake-pat-token> - PAT token generated in Step 1
    • <your-trust3-ai-app-api-key> - API key from Generate Trust3 Application API Key
  4. Click the three dots icon on the top right corner of the app editor.

  5. Go to App Settings > External Networks tab.

  6. Enable the toggle for: ALLOW_SNOWFLAKE_NATIVE_APPS_EAI

  7. Run the application.


What Next?