Skip to content

Commit

Permalink
Updating README for date alias
Browse files Browse the repository at this point in the history
  • Loading branch information
callum-mcdata authored Jan 18, 2023
1 parent 94effe2 commit 232b307
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ If no `grain` is provided to the macro in the query then the dataset returned wi
| start_date | `2022-01-01` | Limits the date range of data used in the metric calculation by not querying data before this date | Optional |
| end_date | `2022-12-31` | Limits the date range of data used in the metric claculation by not querying data after this date | Optional |
| where | `plan='paying_customer'` | A sql statment, or series of sql statements, that alter the **final** CTE in the generated sql. Most often used to limit the data to specific values of dimensions provided | Optional |
| date_alias | `'date_field'` | A string value that aliases the date field in the final dataset | Optional |

## Develop
There are times when you want to test what a metric might look like before defining it in your project. In these cases you should use the `develop` metric, which allows you to provide a single metric in a contained yml in order to simulate what the metric might loook like if defined in your project.
Expand Down Expand Up @@ -157,6 +158,7 @@ from {{ metrics.develop(
| start_date | `2022-01-01` | Limits the date range of data used in the metric calculation by not querying data before this date | Optional |
| end_date | `2022-12-31` | Limits the date range of data used in the metric claculation by not querying data after this date | Optional |
| where | `plan='paying_customer'` | A sql statment, or series of sql statements, that alter the **final** CTE in the generated sql. Most often used to limit the data to specific values of dimensions provided | Optional |
| date_alias | `'date_field'` | A string value that aliases the date field in the final dataset | Optional |

### Multiple Metrics Or Derived Metrics
If you have a more complicated use case that you are interested in testing, the develop macro also supports this behavior. The only caveat is that **you must include the raw tags** for any provided metric yml that contains a derived metric. Example below:
Expand Down

0 comments on commit 232b307

Please sign in to comment.