Hi everyone, I have an issue using elementary, whe...
# community-support
j
Hi everyone, I have an issue using elementary, when I run my dbt tests and then an edr report, it doesn't update the latest runs etc. It feels like the tests are not taken into account by elementary's models anymore. For exemple, I just ran my tests a few minutes ago, even saw the logs, etc, then I run my edr reports and I see this timestamp : 2024-02-20 120732 for the latest run in the elementary UI. Any idea about possible root causes ?
i
Hi @Jérôme MONTIGNY! A couple of questions: 1. Are you using any flags to disable Elementary's on-run-end hook logic? (such as
disable_dbt_artifacts_autoupload
) 2. Does your
elementary
dbt profile point to the Elementary schema of the profile you are running dbt on? (should normally be
<your_regular_schema>_elementary
)
j
Hello @Itamar Hartstein I didn't change anything in Elementary's configuration. How do I know if my elementary dbt profile is the proper one ? (in profiles.yml and in dbt_project.yml, I followed the tutorial, but I might have an issue on this)
i
Hi @Jérôme MONTIGNY, sorry for the delay do you mind sharing with me your
profiles.yml
setup? (after redacting passwords)
j
it looks like this :
Copy code
dbt_project_name_profile:
  target: prd
  outputs:
    prd:
        type: postgres
        host: "{{ env_var('PG_HOST') }}"
        port: "{{ env_var('PG_PORT') | int }}"
        user: "{{ env_var('PG_USER') }}"
        password: "{{ env_var('PG_PASSWORD') }}"
        dbname: company_name
        schema: silver

elementary:
  outputs:
    default:
      type: postgres
      host: "{{ env_var('PG_HOST') }}"
      port: "{{ env_var('PG_PORT') | int }}"
      user: "{{ env_var('PG_USER') }}"
      password: "{{ env_var('PG_PASSWORD') }}"
      dbname: company_name
      schema: silver_elementary 
      threads: 1
i
Thanks @Jérôme MONTIGNY, looks good overall do you also have this in your `dbt_project.yml`:
Copy code
models:
  elementary:
    +schema: elementary
?
j
yes, but I may have added it after running the elementary models creation request
i
got it, that's interesting actually because without that the models would be created under
silver
rather than
silver_elementary
so worth running them again
j
So, I tried doing this :
Copy code
dbt run -s elementary --profiles-dir <profiles-folder> --profile elementary
dbt test --profiles-dir <profiles-folder>
edr report -p <profiles-folder>
And now, there's nothing anymore. Did I miss something ?
i
hey @Jérôme MONTIGNY the dbt runs should not be against the elementary profile, they should be against your regular profile (
dbt_project_name_profile
)
j
Hi! I tried using
Copy code
dbt run -s elementary --profiles-dir <profile-dir> --profile dbt_project_name_profile
dbt test --profiles-dir <profile-dir>
edr report -p <profile-dir>
and it still did not wotk (no test displayed in the UI)
i
@Jérôme MONTIGNY is
dbt_project_name_profile
the default profile for your dbt project? making sure since I see the tests were not run with
--profile dbt_project_name_profile
j
I did dbt test with this profile afterwards and it still did not work