Skip to main content

17 docs tagged with "SQL"

SQL queries used against warehouse and database connections.

View all tags

Advanced Account Model Configuration

This page covers advanced scenarios for the Account model. Each section explains a specific configuration goal, how it works in FunnelStory, and provides query examples for multiple data source types.

Amazon Athena

The Amazon Athena connection lets FunnelStory run queries in your AWS account against data in S3 via Athena, so data models can use curated tables in the AWS Glue Data Catalog (or supported catalogs).

Amazon Redshift

The Amazon Redshift connection lets FunnelStory query your Redshift cluster or Serverless workgroup with read-only SQL to power data models—often used for warehouse-native account and revenue facts.

Attio

The Attio connection lets FunnelStory read CRM objects from your Attio workspace so you can configure data models using Attio’s API-shaped AT blocks (filter, sort, and object type) in the model query step.

BigQuery

The BigQuery connection uses a Google service account so FunnelStory can run read-only jobs against your datasets and drive data models from BigQuery tables and views.

Databricks

The Databricks connection lets FunnelStory run SQL against Databricks SQL warehouses (or SQL endpoints) so data models can read from Unity Catalog–backed tables and views your team already curates.

HubSpot

The HubSpot connection links FunnelStory to your HubSpot portal via OAuth so you can build data models on companies, deals, and contacts using HubSpot’s search APIs (HS blocks in the query step), power CRM sync, and use HubSpot in workflows or analytics where enabled.

MS SQL Server

The Microsoft SQL Server connection lets FunnelStory run read-only queries against SQL Server (or Azure SQL where supported) to back data models such as accounts, contracts, and usage summaries.

MySQL

The MySQL connection lets FunnelStory run read-only SQL against your MySQL database to power data models—accounts, users, billing tables, or any view you maintain for analytics.

PostgreSQL

The PostgreSQL connection lets FunnelStory run read-only SQL against your database to power data models (for example accounts, users, subscriptions, and warehouse-backed metrics). Use it when your source of truth already lives in Postgres or when you expose reporting views for FunnelStory to query.

Prerequisites: Setting Up Data Connections

Before configuring the Account model, you need at least one data connection in FunnelStory. A data connection is a link between FunnelStory and an external system that holds your account data.

Real-World Examples

This page provides complete, end-to-end Account model configurations for common setups. Each example includes the full query, the property mapping table, and an explanation of what's being configured.

Salesforce

The Salesforce connection authorizes FunnelStory to read your CRM data using OAuth. Use it to back data models (with SOQL in the model builder), to support CRM sync where your workspace writes selected fields back to Salesforce, and anywhere else the product surfaces Salesforce as a source.

Snowflake

The Snowflake connection lets FunnelStory query your warehouse with read-only access so you can build data models on curated tables and views—common for ARR, account dimensions, and historical metrics.

Variables and data

Steps pass data through variables. Templates turn those values into SQL, JSON arguments, and prompts.

Writing Queries for the Account Model

The query you write determines what data FunnelStory pulls into the Account model. The format depends on your data source type. This page covers the query syntax for every supported connection type.