Skip to content

Commit

Permalink
Add default join parameter values docs
Browse files Browse the repository at this point in the history
  • Loading branch information
scholtzan committed May 15, 2024
1 parent 523a11d commit f5c33bd
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/concepts/metric_hub.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ Data sources can be joined with other data sources:
# Join the `baseline` data source with the `metrics` data source.
# Definitions for both data sources must exist.
[data_sources.baseline.joins.metrics]
relationship = "many_to_many" # this determines the type of JOIN used; options: many_to_many, one_to_one, one_to_many, many_to_one
on_expression = """ # SQL expression specifying the JOIN condition
relationship = "many_to_many" # this determines the type of JOIN used; options: many_to_many, one_to_one, one_to_many, many_to_one; default: many_to_many
on_expression = """ # SQL expression specifying the JOIN condition; default join is on client_id_column and submission_date_columns
baseline.client_id = metrics.client_id AND
baseline.submission_date = metrics.submission_date
"""
Expand All @@ -100,7 +100,11 @@ Wildcard character can be used to apply joins to multiple data sources:
```toml
# Apply join to all data sources prefixed with user_
[data_sources.user_'*'.joins.metrics]
# defaults are many_to_many relationship and joins on the client_id_column and submission_date_column
# [default] relationship = many_to_many
# [default] on_expression = """ # SQL expression specifying the JOIN condition; default join is on client_id_column and submission_date_columns
# baseline.{client_id_column} = metrics.{client_id_column} AND
# baseline.{submission_date_column} = metrics.{submission_date_column}
# """
```

### `[metrics]` Section
Expand Down

0 comments on commit f5c33bd

Please sign in to comment.