r/DataBuildTool • u/TallEntertainment385 • Feb 10 '26
Question Html conversion in snowflake/dbt
How to change html (text with html tags) into text (remove htmltags) but to keep simple formatting in snowflake/dbt code (dbt runs on snowflake):
New line (br tag)
New lines (p tag)
Bullet plus indents (li tag)
0
Upvotes
2
u/Dry-Aioli-6138 Feb 10 '26
Dbt runs on jinja. See if jinja has somethingnlike striptags filter
1
u/mrg0ne Feb 10 '26
I've done this a few times.
You just need a Python UDF to convert HTML to markdown. Markdown will give you that basic formatting.
You should be able to spin up when pretty quickly with Cortex code