Hi, I wanted to do this looping in dataform .sqlx file:
js {
const tables = [
'table1',
'table2',
'table3'
];
const selectAllFromTables = tables.map(t => {
return `select * from \`${t}\``;
}).join(`
union all
`);
}
${selectAllFromTables}
But I want the list of strings (const table = ) to come from the results of a query, very similar to run_query in dbt. Is it possible in dataform?