<@U088WCP3B4P> how does elementary generate its re...
# ask-elementary-ai
s
@kapa.ai how does elementary generate its reports ?
k
Elementary generates its reports through a two-part process involving the dbt package and the Elementary CLI: 1. Data Collection (dbt Package) When you run
dbt run --select elementary
,
dbt test
, or
dbt build
, the Elementary dbt package collects and stores data in your data warehouse under a dedicated schema (e.g., your_schema`_elementary`). This includes: • dbt test results (stored in
elementary_test_results
) • dbt artifacts such as
dbt_invocations
,
dbt_run_results
,
dbt_models
,
dbt_tests
,
dbt_sources
, and
dbt_exposures
• Anomaly detection results from Elementary tests [Elementary in production] 2. Report Generation (Elementary CLI) The Elementary CLI (
edr
) uses its own internal dbt project to read from the Elementary schema and generate the report. When you run:
Copy code
edr report
The CLI connects to your data warehouse using the
elementary
profile defined in your
profiles.yml
, reads from the Elementary tables, and generates a self-contained HTML report file. [Generate observability report] The CLI profile only needs read access to the Elementary schema, while the dbt package itself needs read/write access. [Slack discussion] Filtering Reports by Invocation You can also filter the report to a specific dbt run:
Copy code
edr report --select last_invocation
edr report --select "invocation_time:2022-12-25 10:10:35"
edr report --select invocation_id:XXXXXXXXXXXXX
[Quickstart report] Sharing Reports Once generated, the report can be shared via: • Slack, Amazon S3, or Google Cloud Storage (GCS) using the
edr send-report
command [CLI commands] šŸ‘ 0 button šŸ‘Ž 0 button ā„¹ļø Tip: Mention @elementary.ai in the thread for follow-ups or DM the app for 1-to-1 help.
s
How do u share using slack ?
@kapa.ai how to install elementary cli to your project
k
Here's how to install the Elementary CLI: 1. Install the Python Package First, install the base CLI package:
Copy code
pip install elementary-data
Then install the adapter for your specific data warehouse (run only the one you need):
Copy code
pip install 'elementary-data[snowflake]'
pip install 'elementary-data[bigquery]'
pip install 'elementary-data[redshift]'
pip install 'elementary-data[databricks]'
pip install 'elementary-data[athena]'
pip install 'elementary-data[trino]'
pip install 'elementary-data[clickhouse]'
pip install 'elementary-data[duckdb]'
pip install 'elementary-data[dremio]'
pip install 'elementary-data[spark]'
pip install 'elementary-data[vertica]'
# Postgres doesn't require this step
[Install Elementary CLI] 2. Validate the Installation
Copy code
edr --help
If you get
command not found: edr
, check the troubleshooting guide. [Quickstart CLI] 3. Configure the Elementary Profile The CLI needs a
profiles.yml
file with an
elementary
profile to connect to your data warehouse. The easiest way to generate it is to run this command inside your dbt project:
Copy code
dbt run-operation elementary.generate_elementary_cli_profile
Copy the output, fill in any missing credentials, and add it to
~/.dbt/profiles.yml
. Here's an example for Snowflake:
Copy code
elementary:
  outputs:
    default:
      type: snowflake
      account: [account id]
      user: [username]
      role: [user role]
      private_key_path: [path/to/private.key]
      private_key_passphrase: [passphrase for the private key, if key is encrypted]
      database: [database name]
      warehouse: [warehouse name]
      schema: [schema name]_elementary
      threads: 4
  target: default
[Configuring the Elementary Profile] > Note: Make sure you have already installed the Elementary dbt package and run
dbt run --select elementary
before using the CLI. [Quickstart CLI] šŸ‘ 0 button šŸ‘Ž 0 button ā„¹ļø Tip: Mention @elementary.ai in the thread for follow-ups or DM the app for 1-to-1 help.