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

Extend DbtDocsLocalOperator with --static flag #746

Closed
joppevos opened this issue Dec 5, 2023 · 2 comments · Fixed by #759
Closed

Extend DbtDocsLocalOperator with --static flag #746

joppevos opened this issue Dec 5, 2023 · 2 comments · Fixed by #759
Assignees
Labels
area:config Related to configuration, like YAML files, environment variables, or executer configuration area:docs Relating to documentation, changes, fixes, improvement dbt:docs Primarily related to dbt docs command or functionality execution:local Related to Local execution environment priority:low Low priority issues are minor issues with a workaround and small impact

Comments

@joppevos
Copy link
Contributor

joppevos commented Dec 5, 2023

dbt docs can be hosted in cloud storage as a static page application. The contents of catalog.json and manifest.json are then directly inserted into the index.html.

A static page app has advantages. For example:

  • Upload and host directly from cloud storage, instead of a server. Making it cheap and easy
  • Single page, making it easy to share around. email, slack etc
  • Use Cloud Storage provider permissions on the file

Since a few months, DBT provides a flag to do this
dbt docs generate --static

I propose to extend this flag to the DbtDocsLocalOperator
Read more about this feature in the dbt discussion here

I'm happy to work on this :)

Copy link

dosubot bot commented Dec 5, 2023

🤖

That's a fantastic idea! Adding the --static flag to the DbtDocsLocalOperator would definitely enhance its functionality and provide users with more options for hosting and sharing dbt documentation. Your proposal to extend this feature aligns well with the benefits of using a static page application, and it's great to hear that you're willing to work on this. Your contribution would be highly valuable to the Cosmos community. Keep up the great work, and thank you for your willingness to contribute!


This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

@dosubot dosubot bot added area:config Related to configuration, like YAML files, environment variables, or executer configuration area:docs Relating to documentation, changes, fixes, improvement dbt:docs Primarily related to dbt docs command or functionality execution:local Related to Local execution environment priority:low Low priority issues are minor issues with a workaround and small impact labels Dec 5, 2023
@tatiana
Copy link
Collaborator

tatiana commented Dec 5, 2023

That's a great idea and initiative, @joppevos - the ticket is assigned to you! 🚀

jbandoro added a commit that referenced this issue Dec 13, 2023
## Description

<!-- Add a brief but complete description of the change. -->
Extends the docsOperator to make use of dbt `--static` flag. The static
flag is available from dbt 1.7>

I decided to add the flag through `dbt_cmd_flags`. Other options could
be a parameter or the `operator_args`.
There is no official documentation page from DBT on the flag
[yet](dbt-labs/docs.getdbt.com#4599). When
they do add it, I can trim down our documentation and link directly to
dbt.

I contribute to learn and am appreciative of any feedback.

## Related Issue(s)
closes #746 
<!-- If this PR closes an issue, you can use a keyword to auto-close.
-->
<!-- i.e. "closes #0000" -->

## Breaking Change?

<!-- If this introduces a breaking change, specify that here. -->

## Checklist

- [x] I have made corresponding changes to the documentation (if
required)
- [x] I have added tests that prove my fix is effective or that my
feature works

---------

Co-authored-by: Tatiana Al-Chueyr <[email protected]>
Co-authored-by: Justin Bandoro <[email protected]>
arojasb3 pushed a commit to arojasb3/astronomer-cosmos that referenced this issue Jul 14, 2024
## Description

<!-- Add a brief but complete description of the change. -->
Extends the docsOperator to make use of dbt `--static` flag. The static
flag is available from dbt 1.7>

I decided to add the flag through `dbt_cmd_flags`. Other options could
be a parameter or the `operator_args`.
There is no official documentation page from DBT on the flag
[yet](dbt-labs/docs.getdbt.com#4599). When
they do add it, I can trim down our documentation and link directly to
dbt.

I contribute to learn and am appreciative of any feedback.

## Related Issue(s)
closes astronomer#746 
<!-- If this PR closes an issue, you can use a keyword to auto-close.
-->
<!-- i.e. "closes #0000" -->

## Breaking Change?

<!-- If this introduces a breaking change, specify that here. -->

## Checklist

- [x] I have made corresponding changes to the documentation (if
required)
- [x] I have added tests that prove my fix is effective or that my
feature works

---------

Co-authored-by: Tatiana Al-Chueyr <[email protected]>
Co-authored-by: Justin Bandoro <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:config Related to configuration, like YAML files, environment variables, or executer configuration area:docs Relating to documentation, changes, fixes, improvement dbt:docs Primarily related to dbt docs command or functionality execution:local Related to Local execution environment priority:low Low priority issues are minor issues with a workaround and small impact
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants