dbt-labs / dbt-snowflake

dbt-snowflake contains all of the code enabling dbt to work with Snowflake
https://getdbt.com
Apache License 2.0
297 stars 177 forks source link

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

Open LewendbtLabs opened 4 months ago

LewendbtLabs commented 4 months ago

Is this a new bug in dbt-snowflake?

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 "https://github.com/dbt-labs/dbt-snowflake/blob/29467c32c005de99fdce868fa551e728928a50bf/dbt/include/snowflake/macros/adapters.sql#L12"

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 commented 4 months ago

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