- Metriql CLI
- Install dbt
dbt init [project_name](See docs)
- Configure dbt profiles
- Create a file called
- Paste the following content:
version: 2sources:- name: first_datasettables:- name: [YOUR_TABLE_NAME_IN_DATABASE]meta:metriql:total_rows:aggregation: countcolumns:- name: [YOUR_COLUMN_NAME_IN_TABLE]meta:metriql.dimension:name: example_dimension #if you don't define `name`, the default is column nametype: string #change this if the column type is not string, see available types
This snippet above creates a dbt source, and each dbt source becomes a dataset in metriql. The dataset measure called
total_rows, and dimension called
Please see the dbt sources to learn more about the concept. We use
meta properties of dbt resources and support all the dbt resources including models, sources, and seeds. See dataset properties for all the metriql-specific properties.
- Install and run metriql
Congrats! You now have a REST API to run queries on your database. The next step is to learn how to query your data.
- Sign up on Rakam here and create a project by entering your data warehouse credentials. If your organization already has a Rakam project, ask them to invite you to the project on the team page
- Click the
Create recipe from scratchbutton on the
Developpage. If you have a repository that includes your dbt project, please skip to Introduction for dbt users
- Give a name to your repository and we’ll start creating your first dataset (See docs) from your data warehouse tables.
+ createin the sidebar and click
create source from DW tables.
- Select the data warehouse table names that you would like to use and click the
import as modelsbutton.
- IDE will create a dbt
sources.ymlfile that you can modify for your use case later. Rakam automatically creates dimensions for each column in your resource files. You can create custom measures and dimensions under meta or model property. See docs to learn more about creating datasets and how to define your metrics.
- Once you're done with metric definitions and modeling, you can click the
Save locallybutton to come back and continue later or
Commit main branchto ship it to production.
- Go to the
Explorepage, select the reporting feature you’d like to use (among
flow) and test out your metric definitions with your data in real-time. Noticed anything that isn’t supposed to be like that? Go to the
Developpage and edit your dataset.
Recipes are pre-defined datasets for different database schemas. If you're using any of the solutions that Rakam has an integration with to collect data into your database, you can install the recipe and use the dashboards and datasets to analyze the data. You can install the recipes on the
Develop page as follows:
- Click the
installbutton in the right-bottom corner of the recipe you'd like to use.
- Select the variables that are asked on the following page. These variables can be
tablenames. When you select the variables, they're passed as an argument to recipes so that they can dynamically build up the models. You can later customize the recipes and create custom metric definitions.