Skip to content
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

Compile arbitrary files in target directory #2072

Closed
clrcrl opened this issue Jan 27, 2020 · 5 comments · Fixed by #2623
Closed

Compile arbitrary files in target directory #2072

clrcrl opened this issue Jan 27, 2020 · 5 comments · Fixed by #2623
Labels
dbt-docs [dbt feature] documentation site, powered by metadata artifacts enhancement New feature or request

Comments

@clrcrl
Copy link
Contributor

clrcrl commented Jan 27, 2020

Describe the feature

As a dbt user, I want to be able to include images in my target directory, so that my docs can render the images.

Currently, to show images in the docs, you can do something like this:

!["Jaffle Shop ERD"](jaffle_shop_erd.png "Jaffle Shop ERD")

But this only works if jaffle_shop_erd.png is in the target directory.

Thoughts:

  • Group these assets into a static directory to give a user control over what is and isn't compiled.
  • Should this have a config in the dbt_project.yml like this:
asset_paths: ['static']

(I have no idea what the right word is here)

Describe alternatives you've considered

N/A

Additional context

N/A

Who will this benefit?

users of the documentation feature

@clrcrl clrcrl added enhancement New feature or request triage labels Jan 27, 2020
@drewbanin drewbanin removed the triage label Jan 27, 2020
@drewbanin
Copy link
Contributor

This reminds me a little bit of #1318. I wonder if there are ways to load up arbitrary-ish files in this directory and either 1) compile them into the target dir or 2) make them available in the compilation context. We'll probably want to solve each of these issues separately, but it does feel like there's some conceptual overlap here.

@aroder
Copy link

aroder commented Jan 27, 2020

You could consider putting the responsibility on the user. Like maybe allowing them to configure a path to a rollup config file or something.

I could see this becoming a rabbit hole once users want more functionality about what to include and how to include it.

Either way, this will be a great feature!

@clrcrl clrcrl changed the title Compile arbitrary files in target directroy Compile arbitrary files in target directory Jan 27, 2020
@radian21
Copy link

I agree this feature would be really useful. It would enhance the power of the dbt generated docs for organizations wishing to decorate the docs with additional image content that adds more end user value. For example, I'm using the dbt auto-docs as a data dictionary for non-technical and a launching point to explain the data platform I've built for end users. Having the ability to customize the content with images that represent my organizational context helps me simplify and improve my communication with users making the docs more approachable and a little less technical.

The contributors to the dbt project are amazing. You're doing great work!

@drewbanin
Copy link
Contributor

drewbanin commented Mar 18, 2020

Cool! Let's go ahead and add an asset_paths: ['static'] config to dbt_project.yml as @clrcrl has shown above.

This path will be copied over directly into the target/static/ directory using the same folder structure as the source folder. dbt should not whitelist file extensions when copying over files from this path.

Let's make it happen!

@drewbanin drewbanin added this to the Octavius Catto milestone Mar 18, 2020
@drewbanin drewbanin added the dbt-docs [dbt feature] documentation site, powered by metadata artifacts label Mar 18, 2020
@drewbanin drewbanin modified the milestones: Octavius Catto, dbt-next Apr 29, 2020
@andrewcstewart
Copy link

This is a great feature idea!

One cool little bonus that this feature would enable: the ability to author and manage Draw.io diagrams alongside your dbt documentation, in the form of editable PNGs that can live directly in the assets dir (see https://github.com/jgraph/drawio/wiki/Embed-Diagrams).

@jtcohen6 jtcohen6 removed this from the Marian Anderson milestone Jul 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dbt-docs [dbt feature] documentation site, powered by metadata artifacts enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants