Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

[Dataform] How to organize table functions, docs within includes folder?

Hello everyone!

I saw in the docs (Add table documentation and Reuse variables and functions with includes in Dataform) you can add table documentation to Dataform by creating a file in the includes/ folder.

Question: Is it possible to organize these files in subfolders inside the includes/ folder? I want to organize the file descriptions, functions, etc by the tables I am working on.

Example:

includes/table_1/docs.js

includes/table_2/docs_2.js 

And how should I do the import into my .sqlx file? I tried using the name of the file but this only works if the file is placed directly in the includes/ folder (includes/docs.js). If I add another folder (includes/folder_1/docs.js) I cannot reference the file correctly. I also tried doing the import with the js module but I cannot use the values inside the config{} block for description and columns.

Thank you so much for your help!

 

2 1 1,010
1 REPLY 1