dataform
dataform copied to clipboard
Read table description from external files
Hi I posted in a wrong thread, but it would be great if there would be some support of sourcing external files for table descriptions (preferably makrdown).
This would enable us to have renderable + re-usable table descriptions across the repository the same way that dbt
does it as well as make the sqlx
file themselves smaller
I suspect this wouldn't be too hard to implement:
- Add a
.md
file reader to the compiler https://github.com/dataform-co/dataform/blob/2531b120c3869dbbc6efb4ecafbcfa9edb99c738/core/compilers.ts#L21 - Expose a new JS method, like
getContents("file.md")
in the session https://github.com/dataform-co/dataform/blob/main/core/session.ts - Attach it to the global session, similar to how we do current attaching https://github.com/dataform-co/dataform/blob/2531b120c3869dbbc6efb4ecafbcfa9edb99c738/core/main.ts#L77