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

[Bug] $ gets converted to [$] for snowflake column descriptions #1148

Open
2 tasks done
LewendbtLabs opened this issue Jul 24, 2024 · 1 comment
Open
2 tasks done
Labels
enhancement New feature or request

Comments

@LewendbtLabs
Copy link

Is this a new bug in dbt-snowflake?

  • I believe this is a new bug in dbt-snowflake
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

The "$" is getting converted to "[$]" and our usual escape mechanisms (", ', >, . , markdown) aren't working for it. I can create descriptions with "$" directly in Snowflake, so it seems to be a dbt thing. The column descriptions are being persisted to the database. The dbt documentation is generated as expected.

According to @mikealfare "

{{ adapter.quote(column_name) }} COMMENT $${{ column_dict[matched_column]['description'] | replace('$', '[$]') }}$$
"

Expected Behavior

The $ should show up as $ in the column description in snowflake.

Steps To Reproduce

My writeup is in the dbt notion .

Essentially you need a yml file for the column description with a $ in the comments.
Then,
+persist_docs:
columns: true

Relevant log output

No response

Environment

- OS:running in dbt cloud
- Python: whatever cloud runs
- dbt-core: latest version of dbt
- dbt-snowflake: latest version

Additional Context

No response

@LewendbtLabs LewendbtLabs added bug Something isn't working triage labels Jul 24, 2024
@LewendbtLabs
Copy link
Author

This was also discussed in an internal slack channel. https://dbt-labs.slack.com/archives/C067EUS2D7S/p1721830759272439

@amychen1776 amychen1776 added enhancement New feature or request and removed triage bug Something isn't working labels Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants