Wondering whether I'm doing something odd, or whet...
# replication-troubleshooting
j
Wondering whether I'm doing something odd, or whether I need to raise a bug ticket, so any advice before I raise a ticket would be great 🙂 I'm trying to run run DBT transformations with: • Docker image: ghcr.io/dbt-labs/dbt-snowflake:1.3.latest • Entrypoint:
run --selector partner_staging
That then goes and: • Pulls down my github repo and docker image • Builds the image and dynamically creates the
profiles.yml
file The issue I'm facing is that when Airbyte auto builds the
profiles.yml
from the airbyte destination config it seems to auto create output of
prod
and I have no way of overriding it - it looks like this:
Copy code
config:
  partial_parse: true
  printer_width: 120
  send_anonymous_usage_stats: false
  use_colors: true
normalize:
  outputs:
    prod:
      account: {obfuscated}
      client_session_keep_alive: false
      connect_retries: 3
      connect_timeout: 15
      database: DEV_PP_AIRBYTE_DB
      password: {obfuscated}
      query_tag: normalization
      retry_all: true
      retry_on_database_errors: true
      role: DEV_LOADER
      schema: PP
      threads: 5
      type: snowflake
      user: {obfuscated}
      warehouse: DEV_LOADING
  target: prod
This is problematic when defaulting to prod because I have a heap of jinja in dbt to handle prod/nonprod environments like this:
Copy code
+database: |
            {%- if  "dev" in target.name -%} DEV_STUDYLINK_ANALYTICS
            {%- elif "prod" in target.name -%} STUDYLINK_ANALYTICS
            {%- else -%} invalid_staging_admit_database
            {%- endif -%}
This isn't an issue if I run DBT myself, because I can have my own profiles output called
dev
or
prod
and inject the
--target
on run. This allows the same code to run across prod/nonprod. But it's a problem for Airbyte as it seems to auto-create the fixed values of
normalise
and
prod
as the target. How can we configure airbyte so that when it does DBT transformations it doesn't auto create the profiles with target
prod
? FYI @Varun Khanna
u
Hello Jason Maddern, it's been a while without an update from us. Are you still having problems or did you find a solution?
j
Just closing the loop here - I can host a profiles outside tmp and link to it with Unix path like ./{path} and just traverse back with ./../../../ to get outside tmp