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

Documentation editor doesn't support doc function #569

Open
1 task
HbirdJ opened this issue Sep 6, 2023 · 2 comments
Open
1 task

Documentation editor doesn't support doc function #569

HbirdJ opened this issue Sep 6, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request hacktoberfest2023 help wanted Extra attention is needed

Comments

@HbirdJ
Copy link

HbirdJ commented Sep 6, 2023

Expected behavior

The doc jinja function is not cleanly supported by the documentation editor.

I would expect either one of the following to occur:

  • The docs jinja code block shows up in the documentation editor
  • Editing and saving the docs block updates the source definition of the doc

Actual behavior

The documentation editor correctly retrieves the docs block, but overwrites the doc function call when documentation is saved.

Steps To Reproduce

_docs.md:

{% docs time %}
UTC timestamp of the data point. Format is 'YYYY-MM-DD hh:mm:ss[.6_digit_fraction]'
{% enddocs %}

_models.yml:

  - name: model_name
    description: "model description"
    columns:
      - name: time
        description: '{{ doc("time") }}'

After clicking Save documentation button, the docs function is overwritten:

_models.yml:

  - name: model_name
    description: "model description"
    columns:
      - name: time
        description: UTC timestamp of the data point. Format is 'YYYY-MM-DD
          hh:mm:ss[.6_digit_fraction]'

Log output/Screenshots

The docs block displays the core docs value in the documentation editor.

image

Operating System

ubuntu 22.04

dbt version

1.5.4

dbt Adapter

BigQuery

dbt Power User version

0.17.5

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
@HbirdJ HbirdJ added the bug Something isn't working label Sep 6, 2023
@anandgupta42 anandgupta42 added the help wanted Extra attention is needed label Sep 11, 2023
@septponf
Copy link

fixing this would be great

@anandgupta42 anandgupta42 added enhancement New feature or request and removed bug Something isn't working labels Jul 19, 2024
@anandgupta42
Copy link
Contributor

related to #726 and #1131

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hacktoberfest2023 help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants