I am promoting a SQL Catalog Item from Environment A to Environment B in Ataccama ONE.
The SQL Catalog Item does not exist in Environment B, so it is expected to be created as part of the import. The required Location/Source GUID mappings are already configured.
The challenge is that the SQL Catalog Item contains an SQL query with an environment-specific schema name.
For example, in Environment A, the query contains:
FROM ENV_A_SCHEMA.brz_pa_oracle_view.table1
WHERE Report_Snapshot_Date = (
SELECT MAX(Report_Snapshot_Date)
FROM ENV_A_SCHEMA.brz_pa_oracle_view.table1
)
LEFT JOIN ENV_A_SCHEMA.brz_pa_oracle_view.table2 pmIn Environment B, the schema should be: FROM ENV_B_SCHEMA.brz_pa_oracle_view.table1 and similarly for the other tables.
What I tried
Based on the Environment Mapping documentation, I configured a scalar mapping for the Location:
{
"location.name": [
{
"pattern": "^<ENV_A_SCHEMA>$",
"replacement": "<ENV_B_SCHEMA>"
}
]
}The Location mapping works as expected.
I also tried to apply a scalar mapping directly to the SQL query because, in the exported JSON, the SQL is stored under:
query.properties.query
I Used:
{
"query.properties.query": [
{
"pattern": "\\b<ENV_A_SCHEMA>\\b",
"replacement": "<ENV_B_SCHEMA>"
}
]
}However, the import completed successfully, but the SQL Catalog Item was created in Environment B with the original query still containing the Environment A schema instead of the Environment B schema.
Export JSON structure
The relevant portion of the exported SQL Catalog Item looks like:
"query": {
"type": "dslQuery",
"id": "...",
"changeType": "REPLACE",
"properties": {
"query": "SELECT ... FROM ENV_A_SCHEMA.brz_pa_oracle_view.table1 ..."
}
}This indicates that the environment-specific schema is stored as literal text inside the SQL query, rather than as a separate schema property/reference.
Question
What is the supported approach in Ataccama ONE for handling environment-specific schema names that are hard-coded inside the SQL query of a dslQueryCatalogItem?
Specifically:
- Is
query.properties.querysupported as a target for scalar environment mapping? - If not, is there another environment-mapping property/reference that should be mapped so that the schema is automatically changed during Environment A → Environment B import?
- Is modifying the SQL query separately for each environment the recommended approach?
- Is there a recommended way to parameterize/environmentalize the schema name so the same SQL Catalog Item can be promoted across environments without manually changing the SQL?

