Configuration & usage
CLI commands and usage
With any of the CLI commands, you can use the --help
flag and get instructions and available options:
CLI commands
Read from the test results table and send new alerts:
Read from the test results table and generate the Elementary UI:
Read from the test results table and generate the Elementary UI and send it to external platforms such as Slack, S3, GCS:
CLI Options
You can define options either via the CLI or using environment variables in the following
format: EDR_<COMMAND>_<OPTION>=<VALUE>
.
Here is a list of all the available options:
- dbt project path:
The path of the directory in which your
dbt_project.yml
file is located. Default is the working directory.
- Profile directory path:
The path of the directory in which your
profiles.yml
file is located. Default isHOME_DIR/.dbt
. - This option must be configured together with profile name.
- Configuration directory path:
The path of the directory in which your
config.yml
file is located. Default isHOME_DIR/.edr
.
- Target directory path The path where all output files such as logs and reports will be saved. If not configured, the default is ./edr_target.
- Profile target: Choose a specific target in case you have multiple targets for Elementary.
- Profile target of your dbt project: Choose a specific target in case you have multiple targets for your dbt project.
- Select: Filter the alerts / report using a selector.
- Slack webhook URL: Pass the webhook URL of your Slack channel to edr as a parameter.
- Slack token and Slack channel name: Pass the Slack token and the Slack channel to edr as parameters.
- Full refresh dbt package models: Force running a full refresh of all incremental models in the edr dbt package.
- Days back: Set a limit to how far back Elementary should collect dbt and Elementary results while generating alerts/report.
- Report file path: The local file path where Elementary’s report will be saved.
- Report remote file name:
The report’s file name, this is how it will be called on Slack, S3, GCS when using
send-report
.
- S3 endpoint url:
The endpoint of the S3 bucket when using
send-report
with any S3 compatible cloud storage service.
- Timezone:
The timezone that will be used upon calculating the alerts’ time field.
A list of timezones can be found here under TZ database name.
- dbt Quoting: Optionally control the quoting setting of the internal dbt package of the elementary CLI. You should use this setting if you are overriding dbt’s default quoting in your main dbt package.
- Disable samples: Disable sampling of data in the report and alerts. Useful if your data is sensitive or contains PII.
- Project name: You can optionally pass a custom project name that will be shown in the report. The default value is the name of your dbt project.
- Environment: This flag indicates if you are running Elementary in a production or development environment and will be reflected accordingly in the report.
- Suppression interval: Suppress similar alerts for a given number of hours. Read more about this setting here. The default suppression interval is 0.
- Override configuration from dbt project: Sometimes, for example during testing and development, you want all your alerts sent to a single slack channel, without suppression, regardless of how they are configured in the model config block or schema.yml in your dbt project. You can do this by using this flag. Please note that when using this flag without passing a suppression interval parameter, the suppression interval for all the alerts will be overridden by the default value, 0.