In mappings, temporary tables are often created and used to load data in the target.
The length of these tables' names can sometimes cause problems in some databases.
Or, when executing multiple mappings using the same tables at the same time, conflicts can appear because the name of the temporary tables will be the same.
It is possible to change these names, and this article shows some tips on how to do it.
Configuration location
First, the place to look is the metadata of the target table(s).
It is possible to change the names for all the tables of a schema, or for each table individually.
On the schema :
Note :
The Delimiter On Temporary Objects
CheckBox , if checked, indicate Stambia to add delimiters (double or single quotes, ...) around the name of the temporary table during creation if necessary (if there are spaces in it, for example).
On each table :
For more information see the Reference Documentation at paragraph "Designer User's Guide > Working with Metadata > Defining a Database Model > Table Name Masks".
With CORE_SESSION_ID
The CORE_SESSION_ID variable can be used to have unique names for each execution
This solution can cause problems and errors for databases that limit the length of table names, because the CORE_SESSION_ID is long. In this case see the process parameter solution.
With the Mapping Id
Particularly useful when working with different Mappings in parallel.
For example:
Load mask: L[number]_[targetName]_{tech:shortMapId()}
Integration mask: I_[targetName]_{tech:shortMapId()}
With a process parameter
Another solution is to put the mapping in a process, and create a parameter in it.
Then, we can use it in the names of the temporary tables :
Finally, the process can be executed.
Note that each mapping/process using this table will now need to declare and set this parameter. Otherwise, the runtime will not be able to substitute the parameter, and unexpected behaviors might occur.
The startdelivery utility can be used to set the parameter on the fly, at execution. See this article for more information.
With truncation of the name
It is possible to indicate Stambia to truncate the name of the temporary Objects, by defining a size in the Object Truncation Size
property of the Temporary Object tab of the schema.