How about moving this to something like `table_config.js`?
e.g. declare/create the variables for <table_database>/ <table_schema>/<table_name> in includes/table_config.js
:
var table_database="tb_db";
var table_schema="tb_sch";
var table_name="tb_nm";
module.exports = {
table_database,
table_schema,
table_name
}
config then have a definition for the table that uses table_config to run it e.g.
definitions/source/final_table01.sqlx
config {
type: "declaration",
database: table_config.table_database,
schema: table_config.table_schema,
name: table_config.table_name
}
Then whenever you want to call it you use:
SELECT * FROM ${ref(table_config.table_name)}