Hi all, I'm running into a recurring issue during...
# community-support
t
Hi all, I'm running into a recurring issue during my elementary implementation where dbt is returning an error about duplicate database representations in GBQ. When I'm looking in GBQ, I can't seem to find the duplicate database representations, so I'm in a pickle. It's running the latest dbt versions/ adapters, leveraging the elementary action v1.12. When I change the custom schema in
dbt_project.yml
, I get the same issue with the duplicate database representations which then mentions the changed custom schema. Any pointers? (I don't want to change package configs) This is the error:
Copy code
09:15:06  Encountered an error:
Compilation Error
  dbt found two resources with the database representation "`org`.`elementary`.``".
  dbt cannot create two resources with identical database representations. To fix this,
  change the configuration of one of these resources:
  - model.elementary.dbt_metrics (models/edr/dbt_artifacts/dbt_metrics.sql)
  - model.elementary.dbt_exposures (models/edr/dbt_artifacts/dbt_exposures.sql)
n
Hey Thijs! 🙂 A few questions so we can understand the issue - 1. What elementary dbt data reliability package are you using? 2. Can you share the models section of your
dbt_project.yml
? 3. Does this error ocurr on
dbt run
?
t
Hi! Many thanks for your answer 🙂. I've fixed this issue since then, there was a conflict with the macro that's responsible for creating custom schemas and aliases. Now I'm running into a separate issue, where the action states a manifest couldn't be found:
Copy code
2025-01-12 20:20:42,580 Failed to get Elementary dbt package version: ***'returncode': 1, 'cmd': ['dbt', '--log-format', 'json', 'run-operation', 'get_elementary_dbt_pkg_version', '--project-dir', '/edr_stager_dbt_project'], 'output': b'***"data": ***"log_version": 3, "version": "=1.9.1"***, "info": ***"category": "", "code": "A001", "extra": ***, "invocation_id": "7f4bed7c-60c1-4349-9b52-1af18332ec31", "level": "info", "msg": "Running with dbt=1.9.1", "name": "MainReportVersion", "pid": 61, "thread": "MainThread", "ts": "2025-01-12T20:20:39.807130Z"***\n***"data": ***"adapter_name": "bigquery", "adapter_version": "=1.9.1"***, "info": ***"category": "", "code": "E034", "extra": ***, "invocation_id": "7f4bed7c-60c1-4349-9b52-1af18332ec31", "level": "info", "msg": "Registered adapter: bigquery=1.9.1", "name": "AdapterRegistered", "pid": 61, "thread": "MainThread", "ts": "2025-01-12T20:20:40.748607Z"***\n***"data": ***"reason": "saved manifest not found. Starting full parse."***, "info": ***"category": "", "code": "I024", "extra": ***, "invocation_id": "7f4bed7c-60c1-4349-9b52-1af18332ec31", "level": "info", "msg": "Unable to do partial parsing because saved manifest not found. Starting full parse.", "name": "UnableToPartialParse", "pid": 61, "thread": "MainThread", "ts": "2025-01-12T20:20:40.958011Z"***\n***"data": ***"stat_line": "495 macros"***, "info": ***"category": "", "code": "W006", "extra": ***, "invocation_id": "7f4bed7c-60c1-4349-9b52-1af18332ec31", "level": "info", "msg": "Found 495 macros", "name": "FoundStats", "pid": 61, "thread": "MainThread", "ts": "2025-01-12T20:20:42.126075Z"***\n***"data": ***"exc": "\'NoneType\' object has no attribute \'close\'"***, "info": ***"category": "", "code": "Q036", "extra": ***, "invocation_id": "7f4bed7c-60c1-4349-9b52-1af18332ec31", "level": "error", "msg": "Encountered an error while running operation: \'NoneType\' object has no attribute \'close\'", "name": "RunningOperationUncaughtError", "pid": 61, "thread": "MainThread", "ts": "2025-01-12T20:20:42.140206Z"***\n', 'stderr': b''***
Even though the action is also running dbt deps. Should I run a compile statement before running the action? 1. 0.16.3 2. I can't without heavily redacting it, is it still relevant? 3. Not locally, it's only happening in the action. Even when I replace my local credentials with the credentials used by the Action, it works fine (locally).
n
To make sure your project is properly set up with the manifest, start with running
dbt deps
and
dbt compile
as you said 🙂
t
Made the change and now I love database errors:
Copy code
Run dbt compile --profile elementary --target prod
  dbt compile --profile elementary --target prod
  shell: /usr/bin/bash -e ***0***
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.11.11/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.11.11/x64/lib
16:06:55  Running with dbt=1.9.1
16:06:56  Registered adapter: bigquery=1.9.1
16:06:57  Unable to do partial parsing because saved manifest not found. Starting full parse.
16:07:02  [WARNING]: Deprecated functionality
Starting in v1.3, the 'name' of an exposure should contain only letters,
numbers, and underscores. Exposures support a new property, 'label', which may
contain spaces, capital letters, and special characters. Churn Dashboard does
not follow this pattern. Please update the 'name', and use the 'label' property
for a human-friendly title. This will raise an error in a future version of
dbt-core.
16:07:04  [WARNING]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.main.ods.ods_static
16:07:05  Found 581 models, 2 analyses, 4 seeds, 3 operations, 112 data tests, 4 snapshots, 271 sources, 60 exposures, 1319 macros
16:07:05  
16:07:05  Concurrency: 4 threads (target='prod')
16:07:05  
16:07:05  Encountered an error:
Database Error
  expected str, bytes or os.PathLike object, not NoneType
Error: Process completed with exit code 2.
Will do some further investigations, thanks for your time.