Morph

Connector / Snowflake

Snowflake

Database

Integration with Snowflake empowers organizations to efficiently analyze large-scale data while ensuring speed and security. With Morph, users can run real-time SQL queries on massive datasets and quickly build intuitive dashboards for advanced analytics. Moreover, Python and MDX integrations enable AI-driven insights, customized reporting, and seamless collaboration across teams, fostering rapid data-driven decision-making.

Set up connection information

Please refer to the DB/SaaS Connection to register the SQL Connection.

Example of SQL query execution

You can create .sql files and execute SQL queries on the connected database. Use the config function to select the connection you want to use from the available SQL Connections. Replace the value of connection with the name of the SQL Connection you created.

{{
  config(
    name="get_users_list",
    connection="CONNECTION_NAME"
  )
}}
SELECT id, name, email, age
FROM users
WHERE created_at >= '2024-01-01'
ORDER BY created_at DESC;

Use in SQL and Python

The SQL queries you create can be called from Python and MDX files.

Python

@morph.func
@morph.load_data("get_users_list")
def visualize_users(context):
    df = context.data["get_users_list"].groupby("age").size().reset_index(name="count")
    fig = px.bar(df, x="age", y="count")
    return fig

Markdown

export const title = "Starter App"

# Starter App

This is a starter app.

## Data

<Grid cols="2">
  <div>
    <DataTable loadData="get_users_list" height={300} />
  </div>
  <div>
    <Embed loadData="visualize_users" height={300} />
  </div>
</Grid>