Summary
A lightweight GitHub Action that connects to Snowflake using your provided credentials, runs one SQL statement, and prints the full JSON result (rows, query ID, session ID, and context). Perfect for quick smoke tests or automating Snowflake admin tasks without wiring up a full client.
It also sets the SNOWFLAKE_* values as current with the USE sql command after successful connection
Usage
- uses: marcelinojackson-org/Snowflake.RunSQLAction@v1
with:
sql: "select current_user() as current_user"
env:
SNOWFLAKE_ACCOUNT: ${{ vars.SNOWFLAKE_ACCOUNT }}
SNOWFLAKE_ACCOUNT_URL: ${{ vars.SNOWFLAKE_ACCOUNT_URL }}
SNOWFLAKE_USER: ${{ vars.SNOWFLAKE_USER }}
SNOWFLAKE_PASSWORD: ${{ secrets.SNOWFLAKE_PASSWORD }} ## OR ${{ secrets.SNOWFLAKE_PAT }}
SNOWFLAKE_ROLE: ${{ vars.SNOWFLAKE_ROLE }}
SNOWFLAKE_WAREHOUSE: ${{ vars.SNOWFLAKE_WAREHOUSE }}
SNOWFLAKE_DATABASE: ${{ vars.SNOWFLAKE_DATABASE }}
SNOWFLAKE_SCHEMA: ${{ vars.SNOWFLAKE_SCHEMA }}