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!
I know that if my file is in includes/docs.js in my sqlx I can call it as
config: {
type: “table”,
description: docs.description,
…
}
I tried importing the file with javascript, using the name of the file inside the folder, etc. But I cannot get the result I needed.
Julio Montiel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.