-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CT-3509] [Bug] assets not being copied to target directory with docs generate --project-dir
#9308
Comments
Thanks for reaching out and providing such a nice set of instructions @hvignolo87 🥇 I tried reproducing the issue you reported using I wonder if something is accidentally misspelled or misconfigured in your project that can explain what is going on? Could you try out the example below and see if it works for you or not? Example that worked for meProject filesHere's my exact set of files:
name: "my_project"
version: "1.0.0"
config-version: 2
profile: "postgres"
asset-paths: ["assets"]
{{ config(materialized="table") }}
select 1 as customer_id
version: 2
models:
- name: customers
description: "![dbt Logo](assets/dbt-logo.svg)"
columns:
- name: customer_id
description: Primary key Commandsmkdir -p assets
curl -o assets/dbt-logo.svg https://docs.getdbt.com/img/dbt-logo.svg
dbt docs generate
ls -al target/assets
dbt docs serve --port 8080 --browser Output
|
Hi @dbeatty10! Thank you very much for your quick answer! 😅 I'm not able to reproduce your example, still not working for me. Here's a MRE of what I have locally. Please fill in your credentials in poetry run dbt docs generate --project-dir test --profiles-dir test Then please go to the targets folder and see if the Here's a video of what I'm doing: |
Thanks for your source code for a MRE along with a video 🤩 That helps get to the bottom of things. Let's suppose I have a project located at ✅ Then any of the following does successfully add the dbt docs generate
dbt docs generate --project-dir .
dbt docs generate --project-dir /some_path/test/ ❌ But this does not add the
So ultimately it's the This looks similar to #8385 to me, and it might have a similar solution. |
I've confirmed that this is an issue in 1.7 (currently the latest) as well as dbt-core 1.5 (as originally reported). Acceptance criteria |
docs generate --project-dir
This worked for me too 😃 |
Is this a new bug in dbt-core?
Current Behavior
Having an
assets-path
defined in thedbt_project.yml
file:The directory
assets
is not being copied totarget/assets
when runningdbt docs generate
, as mentioned in the docs. Then, any attempt to load an image from that directory fails. It works fine with external links and when manually copyingassets
totarget/assets
.Expected Behavior
The
assets
directory is copied totarget/assets
and the images shown in the documentationSteps To Reproduce
dbt init
profiles.yml
asset-paths: ["assets"]
to thedbt_project.yml
file, and create the directoryassets
directorymodels/properties.yml
file for the example model, and include a description like this onedbt docs generate
dbt docs serve --port 8080 --browser
Relevant log output
Environment
Which database adapter are you using with dbt?
redshift
Additional Context
I'm running dbt in a virtual environment managed with poetry 1.6.1
The text was updated successfully, but these errors were encountered: