Ian OLeary
11/20/2024, 6:49 PMmanifests/macros.sql
or something of the sort, which just about always turns out to be something with the dbt version and sort of fixes itself. Again - same exact image being run on both environments.visch
11/20/2024, 6:54 PMIan OLeary
11/20/2024, 6:58 PMmeltano config dbt-snowflake list
on both and the only difference is the db name which is expected.Ian OLeary
11/20/2024, 6:58 PMvisch
11/20/2024, 7:01 PMIan OLeary
11/20/2024, 7:20 PMmeltano invoke dbt-snowflake:debug
which succeeded on both, run`meltano config dbt-snowflake list` meltano invoke dbt-snowflake --version
and everything is the same between them. All env var's are the same (except for the db of courseIan OLeary
11/20/2024, 7:21 PMFROM meltano/meltano:v3.5.1-python3.10
WORKDIR /project
# Install any additional requirements
COPY ./requirements.txt .
RUN pip install -r requirements.txt
# Copy over Meltano project directory
COPY . .
RUN meltano install
# Set env var to false so DBT can run "clean"
ENV DBT_CLEAN_PROJECT_FILES_ONLY=false
# Don't allow changes to containerized project files
ENV MELTANO_PROJECT_READONLY=1
RUN apt-get update && apt-get install -y dos2unix
COPY entrypoint.sh /project/entrypoint.sh
RUN dos2unix /project/entrypoint.sh
RUN chmod +x /project/entrypoint.sh
ENTRYPOINT ["/bin/bash", "-c", "/project/entrypoint.sh"]
Dockerfile
entrypoint.sh parses my dbt manifest then starts dagsterIan OLeary
11/20/2024, 7:22 PMutilities:
- name: dbt-snowflake
variant: dbt-labs
pip_url: dbt-core~=1.8.0 dbt-snowflake~=1.8.0 git+<https://github.com/meltano/dbt-ext.git@v0.1.0>
commands:
parse_manifest:
args: parse --quiet
executable: dbt_invoker
meltano.yml (db config in "environments")joshua_janicas
11/20/2024, 9:01 PMIan OLeary
11/21/2024, 2:40 PMErrors parsed from dbt logs:
Encountered an error:
'dbt_<snowflake://macros/catalog.sql>'
Traceback (most recent call last):
File "/project/.meltano/utilities/dagster/venv/lib/python3.10/site-packages/dbt/cli/requires.py", line 138, in wrapper
result, success = func(*args, **kwargs)
File "/project/.meltano/utilities/dagster/venv/lib/python3.10/site-packages/dbt/cli/requires.py", line 101, in wrapper
return func(*args, **kwargs)
File "/project/.meltano/utilities/dagster/venv/lib/python3.10/site-packages/dbt/cli/requires.py", line 218, in wrapper
return func(*args, **kwargs)
File "/project/.meltano/utilities/dagster/venv/lib/python3.10/site-packages/dbt/cli/requires.py", line 247, in wrapper
return func(*args, **kwargs)
File "/project/.meltano/utilities/dagster/venv/lib/python3.10/site-packages/dbt/cli/requires.py", line 294, in wrapper
return func(*args, **kwargs)
File "/project/.meltano/utilities/dagster/venv/lib/python3.10/site-packages/dbt/cli/requires.py", line 320, in wrapper
ctx.obj["manifest"] = parse_manifest(
File "/project/.meltano/utilities/dagster/venv/lib/python3.10/site-packages/dbt/parser/manifest.py", line 1898, in parse_manifest
manifest = ManifestLoader.get_full_manifest(
File "/project/.meltano/utilities/dagster/venv/lib/python3.10/site-packages/dbt/parser/manifest.py", line 330, in get_full_manifest
manifest = loader.load()
File "/project/.meltano/utilities/dagster/venv/lib/python3.10/site-packages/dbt/parser/manifest.py", line 399, in load
self.load_and_parse_macros(project_parser_files)
File "/project/.meltano/utilities/dagster/venv/lib/python3.10/site-packages/dbt/parser/manifest.py", line 676, in load_and_parse_macros
block = FileBlock(self.manifest.files[file_id])
KeyError: 'dbt_<snowflake://macros/catalog.sql>'
@joshua_janicas I was able to replicate the error on local container. This is what I'm getting - same error as in ACA. Again, when I swap the meltano env over to use prod config and prod snowflake database that's what breaks it. That is the only difference lol. Just tested it with dev and it materialized without failure. At least I know that the failure isnt due to the ACA configuration now since I had the same failure on local.joshua_janicas
11/21/2024, 2:42 PMjoshua_janicas
11/21/2024, 2:42 PMIan OLeary
11/21/2024, 2:43 PMIan OLeary
11/21/2024, 2:43 PMjoshua_janicas
11/21/2024, 2:45 PMjoshua_janicas
11/21/2024, 2:45 PMIan OLeary
11/21/2024, 2:47 PMcommands:
parse_manifest:
args: parse --quiet
executable: dbt_invoker
I use that as well after I saw one of your posts a while backIan OLeary
11/21/2024, 3:02 PMIan OLeary
11/21/2024, 3:07 PMjoshua_janicas
11/21/2024, 3:07 PMIan OLeary
11/21/2024, 3:08 PMIan OLeary
11/21/2024, 4:41 PMjoshua_janicas
11/21/2024, 4:45 PM'dbt_<snowflake://macros/catalog.sql>'
i assume that macro is nothing you madejoshua_janicas
11/21/2024, 4:45 PMIan OLeary
11/21/2024, 5:15 PMparse_manifest
has already been run since thats the preliminary step to serving dagster in my dockerfile - so idk why thats in the stack trace. The manifest has already been parsed for dagster and my model lineage is all the same, etc... I'll try that next thoughEdgar Ramírez (Arch.dev)
11/21/2024, 8:01 PMwhen I swap the meltano env over to use prod configdo you mean literally the
--environment
command line flag? Or how do you switch envs?Ian OLeary
11/21/2024, 8:02 PMEdgar Ramírez (Arch.dev)
11/21/2024, 8:03 PMMELTANO_ENVIRONMENT
anywhere expecting it to be interpolated, i.e. as ${MELTANO_ENVIRONMENT}
or similar?Ian OLeary
11/21/2024, 8:04 PMIan OLeary
11/21/2024, 8:05 PMEdgar Ramírez (Arch.dev)
11/21/2024, 8:05 PMIan OLeary
11/21/2024, 8:07 PMIan OLeary
11/21/2024, 8:07 PMEdgar Ramírez (Arch.dev)
11/21/2024, 8:09 PMIan OLeary
11/21/2024, 8:12 PMIan OLeary
11/21/2024, 8:12 PMjoshua_janicas
11/21/2024, 8:15 PMjoshua_janicas
11/21/2024, 8:16 PMdbt_project.yml
This is my current setup
clean-targets:
- ../.meltano/transformers/dbt/target/compiled
- ../.meltano/transformers/dbt/target/run
- dbt_packages
- logs
Ian OLeary
11/21/2024, 8:25 PMIan OLeary
11/21/2024, 8:29 PMmeltano:
target:
curious - what do you have this default set to in your dbt_profiles.yml?joshua_janicas
11/21/2024, 8:31 PMmeltano:
target: "{{ env_var('MELTANO_ENVIRONMENT', 'dev') }}"
Ian OLeary
11/21/2024, 8:31 PMIan OLeary
11/21/2024, 8:44 PMjoshua_janicas
11/21/2024, 8:44 PMjoshua_janicas
11/21/2024, 8:44 PMIan OLeary
11/21/2024, 8:45 PMIan OLeary
11/21/2024, 8:45 PM