### BigQuery Private Key Example Source: https://help.steep.app/databases/bigquery This is an example of a private key string for a BigQuery service account. Ensure the entire key, including the BEGIN and END markers, is copied accurately. ```text -----BEGIN PRIVATE KEY----- MIIEvgIBADANBgkq…F6HhhtvY -----END PRIVATE KEY----- ``` -------------------------------- ### Define an 'orders' Cube with measures and dimensions Source: https://help.steep.app/integrations/cube This example shows how to define a simple 'orders' cube in Cube, including a 'total' measure and 'created_at' and 'country' dimensions. ```yaml cubes: - name: orders sql_table: orders measures: - name: total description: "Total number of orders received" sql: net_orders type: sum dimensions: - name: created_at sql: TIMESTAMP(created_at) type: time - name: country sql: country type: string ``` -------------------------------- ### Define a Custom Ratio Metric Source: https://help.steep.app/setup-and-manage/code-reference Use the 'custom-ratio' type for ratios calculated using SQL expressions for both numerator and denominator. This example calculates KYC approval percentage. ```yaml metrics: - identifier: "kyc_approved" name: "KYC Approved %" description: "Percentage of users approved through KYC processes. KYC stands for 'Know Your Customer': used to verify a customer's identity and assess risk, helping prevent fraud and financial crimes." type: "custom-ratio" time: "customers.created_at" numerator_sql: "SUM(CASE WHEN customers.country != 'SE' THEN 1 END)" denominator_sql: "COUNT(*)" format: "percentage" dimensions: - "this.*" ``` -------------------------------- ### Example BigQuery Service Account JSON Key Source: https://help.steep.app/databases/bigquery This JSON structure represents a downloaded key file for a BigQuery service account. It contains essential fields like project_id, client_email, and private_key required for authentication. ```json { "type": "service_account", "project_id": "myproject-123456", "private_key_id": "efb9f928a3869d2d20c87e108405d7f0bf68a753", "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvQIuTx+U=\n-----END PRIVATE KEY-----\n", "client_email": "steep@myproject-123456.iam.gserviceaccount.com", "client_id": "123456789", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://oauth2.googleapis.com/token", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/steep%40myproject-123456.iam.gserviceaccount.com" } ``` -------------------------------- ### Define a 'orders_total' view as a metric in Cube Source: https://help.steep.app/integrations/cube This example defines a 'orders_total' view that includes measures and dimensions from the 'orders' cube, making it available as a metric in Steep. It specifies a single time dimension and a single measure. ```yaml views: - name: orders_total description: "Sum of total order amount. Includes tax and revenue." includes: # Measure - orders.total # Time - orders.created_at # Dimensions - orders.country - orders.segment ``` -------------------------------- ### Define a Derived Ratio Metric Source: https://help.steep.app/setup-and-manage/code-reference Use the 'derived-ratio' type to define a ratio based on other defined metrics. This example calculates 'Orders per Active User'. ```yaml metrics: - identifier: "orders_per_active_user" name: "Orders per Active User" description: "Number of orders per active customer" category: "Commercial" numerator: "orders" denominator: "active_customers" type: "derived-ratio" format: "number" dimensions: - "this.*" ``` -------------------------------- ### Join Path Definition Source: https://help.steep.app/setup-and-manage/code-reference Connects modules to combine data, allowing Steep to follow join paths up to two steps away. This example joins customers to transactions. ```yaml joinPaths: - from: column: "id" to: table: "transactions" column: "customer_id" type: "one-to-many" ``` -------------------------------- ### Define a Count Metric Source: https://help.steep.app/setup-and-manage/code-reference Use the 'count' type to determine the total number of orders. This example demonstrates basic filtering and dimension settings. ```yaml metrics: - identifier: "orders" name: "Orders" description: "Number of orders." category: "Operations" type: "count" time: "orders.created_at" owner_emails: - "vitor@company.com" - "ebba@company.com" filters: - column: "country" operator: "not-equals" expression: "test_country" dimensions: - "this.*" ``` -------------------------------- ### Set Steep metadata for a measure in Cube Source: https://help.steep.app/integrations/cube This example demonstrates how to use the 'meta' field within a measure definition in Cube to control Steep-specific properties like category, owner, and privacy settings. ```yaml # Example measures: - name: registrations ... meta: category_name: Onboarding owner_emails: [john@example.com] is_private: false unlisted: false ``` -------------------------------- ### Define a Custom Value Metric Source: https://help.steep.app/setup-and-manage/code-reference Use the 'custom-value' type for complex aggregations defined via SQL expressions. This example calculates partner orders using a CASE statement. ```yaml metrics: - identifier: "partner_orders" name: "Partner orders" description: "Orders coming in through partner." type: "custom-value" time: "orders.created_at" sql_expression: "SUM(CASE WHEN customers.type = 'partner' THEN orders.order_volume END)" dimensions: - "this.*" ``` -------------------------------- ### Example User Attribute Table for RLS Source: https://help.steep.app/setup-and-manage/row-level-security This table structure is used to define custom user attributes for row-level security. It maps member emails to specific attributes like manager or market, with each mapping requiring a separate row. ```SQL user_email| manager_of| market ---|---|--- sophie@company.com| alex@company.com| null sophie@company.com| sara@company.com| null sophie@company.com| null| SE sophie@company.com| null| US alex@company.com| sara@company.com| null alex@company.com| null| US ``` -------------------------------- ### Define a Metric in dbt Source: https://help.steep.app/integrations/dbt-cloud Example of defining a simple metric named 'order_total' in dbt, referencing a measure defined in a semantic model. This metric calculates the sum of total order amount. ```yaml metrics: - name: order_total description: Sum of total order amount. Includes tax + revenue. type: simple label: Order Total type_params: measure: order_total ``` -------------------------------- ### Get a single metric Source: https://help.steep.app/developers Retrieves a single metric by its unique identifier. ```APIDOC ## GET /v1/metrics/{metricId} ### Description Get a single metric by id. ### Method GET ### Endpoint /v1/metrics/{metricId} ### Parameters #### Path Parameters - **metricId** (string) - Required - The unique identifier of the metric. ``` -------------------------------- ### Create MySQL User and Grant SELECT Permissions Source: https://help.steep.app/databases/mysql Use this SQL script to create a new user for Steep and grant it SELECT privileges on all tables within a specified database. Replace bracketed placeholders with your actual database and desired password. ```sql -- Create user CREATE USER steep IDENTIFIED BY ''; GRANT SELECT ON .* TO steep; ``` -------------------------------- ### List target series (Beta) Source: https://help.steep.app/developers Lists all target series and their associated metrics for your workspace. This endpoint is in beta. ```APIDOC ## GET /v1/targets ### Description _(Beta)_ List all target series and their metrics for your workspace. ### Method GET ### Endpoint /v1/targets ``` -------------------------------- ### Create User and Grant Access in Synapse SQL Source: https://help.steep.app/databases/synapse-sql Use this SQL script to create a new login and user for Steep, and grant it read-only access to the database. Replace bracketed placeholders with your specific details. ```sql -- Create user CREATE LOGIN steep WITH PASSWORD = ''; CREATE USER steep FROM LOGIN steep; -- Grant access ALTER ROLE db_datareader ADD MEMBER steep; ``` -------------------------------- ### Create PostgreSQL User and Grant Permissions Source: https://help.steep.app/databases/postgresql Use this SQL script to create a dedicated user for Steep and grant necessary read permissions on tables within a specified schema. Replace bracketed placeholders with your actual database details. ```sql -- Create user CREATE USER steep WITH PASSWORD ''; GRANT CONNECT ON DATABASE TO steep; GRANT USAGE ON SCHEMA TO steep; GRANT SELECT ON ALL TABLES IN SCHEMA TO steep; -- Grant access to all future tables in schema, usually what you want ALTER DEFAULT PRIVILEGES IN SCHEMA GRANT SELECT ON TABLES TO steep; ``` -------------------------------- ### List modules Source: https://help.steep.app/developers Retrieves a list of modules, including their label, description, identifier, and table and schema information. ```APIDOC ## GET /v1/modules ### Description List modules, including label, description, identifier, and table and schema information. ### Method GET ### Endpoint /v1/modules ``` -------------------------------- ### Create Redshift User and Grant Permissions Source: https://help.steep.app/databases/redshift Use this SQL script to create a new user for Steep and grant it necessary SELECT privileges on tables within a specified schema. It also configures default privileges for future tables. ```sql -- Create user CREATE USER steep WITH PASSWORD ''; GRANT USAGE ON SCHEMA TO steep; GRANT SELECT ON ALL TABLES IN SCHEMA TO steep; -- Grant access to all future tables in schema, usually what you want ALTER DEFAULT PRIVILEGES IN SCHEMA GRANT SELECT ON TABLES TO steep; ``` -------------------------------- ### Enable rmcp Client Feature in Codex Source: https://help.steep.app/setup-and-manage/mcp Configuration to enable the experimental rmcp client feature in Codex. This may be required for MCP functionality. ```toml [features] experimental_use_rmcp_client = true ``` -------------------------------- ### Create Snowflake Role, Network Rule, and Service User Source: https://help.steep.app/databases/snowflake This SQL script creates a new role for Steep, configures network rules and policies to allow access from Steep's IP address, and sets up a service user with programmatic access. Ensure you replace bracketed placeholders with your specific details. ```sql -- Create Role CREATE ROLE IF NOT EXISTS STEEP; GRANT USAGE ON WAREHOUSE TO ROLE STEEP; GRANT USAGE ON DATABASE TO ROLE STEEP; GRANT USAGE ON SCHEMA TO ROLE STEEP; GRANT SELECT ON ALL TABLES IN SCHEMA TO ROLE STEEP; -- Configure network rule and policy to allow access from Steep -- For more information, see https://docs.snowflake.com/en/user-guide/network-policies CREATE NETWORK RULE enable_incoming_from_steep MODE = INGRESS TYPE = IPV4 VALUE_LIST = ('34.78.69.173/32'); CREATE NETWORK POLICY allow_steep_connection ALLOWED_NETWORK_RULE_LIST = ('enable_incoming_from_steep') COMMENT = 'Allow connections from Steep application'; -- Create User CREATE USER IF NOT EXISTS steep DEFAULT_ROLE = STEEP TYPE = SERVICE; GRANT ROLE STEEP TO USER steep; ALTER USER steep SET DEFAULT_WAREHOUSE = ; ALTER USER steep SET NETWORK_POLICY = allow_steep_connection; ALTER USER steep SET QUOTED_IDENTIFIERS_IGNORE_CASE = FALSE; ALTER USER steep ADD PROGRAMMATIC ACCESS TOKEN steep_programmatic_access_token ROLE_RESTRICTION = 'STEEP' DAYS_TO_EXPIRY = 365; --This will create a token that is valid for 365 days ``` -------------------------------- ### List all metrics Source: https://help.steep.app/developers Retrieves a list of all available metrics within the Steep metric catalog. ```APIDOC ## GET /v1/metrics ### Description List all metrics in the metric catalog. ### Method GET ### Endpoint /v1/metrics ``` -------------------------------- ### Define a Ratio Metric Source: https://help.steep.app/setup-and-manage/code-reference Use the 'ratio' type to calculate metrics like conversion rate. This snippet specifies the numerator, denominator, and desired format. ```yaml metrics: - identifier: "conversion_rate" name: "Conversion rate" description: "Conversion rate measures the percentage of users who sign-up." type: "ratio" time: "site.visit_at" numerator: "site.conversions" denominator: "site.visits" format: "percentage" dimensions: - "this.*" ``` -------------------------------- ### Manage semantic layer syncs Source: https://help.steep.app/developers Automates or triggers a semantic layer sync for dbt and Cube integrations. ```APIDOC ## POST /v1/semantic-layer-syncs ### Description Automate or trigger a semantic layer sync for dbt and Cube integrations. ### Method POST ### Endpoint /v1/semantic-layer-syncs ``` -------------------------------- ### Query time-series target data (Beta) Source: https://help.steep.app/developers Queries time-series target data for a specific metric and series. This endpoint is in beta. ```APIDOC ## GET /v1/targets/query ### Description _(Beta)_ Query time-series target data for a metric and series. ### Method GET ### Endpoint /v1/targets/query ``` -------------------------------- ### List entities Source: https://help.steep.app/developers Retrieves a list of entities, including basic metadata such as name and module. ```APIDOC ## GET /v1/entities ### Description List entities with basic metadata such as name and module. ### Method GET ### Endpoint /v1/entities ``` -------------------------------- ### Troubleshooting Athena Connection Error: No Output Location Source: https://help.steep.app/databases/athena This error indicates that an S3 bucket location for query results was not specified. Ensure your primary workgroup configuration includes an output location. ```text No output location provided. You did not provide an output location for your query results. Either specify an S3 bucket location or enable Athena managed query results in your workgroup settings. ``` -------------------------------- ### List workspace teams Source: https://help.steep.app/developers Retrieves a list of teams within the workspace, including their name, description, and members. ```APIDOC ## GET /v1/workspace/teams ### Description List teams, including name, description, and members. ### Method GET ### Endpoint /v1/workspace/teams ``` -------------------------------- ### Cursor MCP Server Configuration Source: https://help.steep.app/setup-and-manage/mcp Configuration for the Steep MCP server in Cursor. This can be done through the settings UI or by directly editing the mcp.json file. ```json { "mcpServers": { "steep": { "url": "https://mcp.steep.app/mcp" } } } ``` -------------------------------- ### List workspace members Source: https://help.steep.app/developers Retrieves a list of workspace members, including their name, email, and role. ```APIDOC ## GET /v1/workspace/members ### Description List workspace members, including name, email, and role. ### Method GET ### Endpoint /v1/workspace/members ``` -------------------------------- ### Query a specific metric Source: https://help.steep.app/developers Queries a specific metric using Steep’s query engine, returning aggregated results and the SQL query used. ```APIDOC ## POST /v1/metrics/{metricId}/query ### Description Query a specific metric using Steep’s query engine and return aggregated results and SQL query. ### Method POST ### Endpoint /v1/metrics/{metricId}/query ### Parameters #### Path Parameters - **metricId** (string) - Required - The unique identifier of the metric. ``` -------------------------------- ### Codex Add MCP Server Command Source: https://help.steep.app/setup-and-manage/mcp Command to add the Steep MCP server in Codex. This command associates a name with the server URL. ```bash codex mcp add steep --url https://mcp.steep.app/mcp ```