Skip to main content
Question

How to handle environment-specific schema names inside SQL Catalog Item queries during asset promotion?

  • August 19, 2026
  • 0 replies
  • 14 views

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 pm

In 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:

  1. Is query.properties.query supported as a target for scalar environment mapping?
  2. 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?
  3. Is modifying the SQL query separately for each environment the recommended approach?
  4. 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?