How use Temporary entity
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2025 03:25 AM
Hi
I have a question about temporary entity.
In what cases would you use an temporary entity in an ETL definition?
In the condition script for an RTE mapping, I created an temporary entity
because I couldn't obtain the value of the input entity, and then mapped the entire input entity data to the temporary entity.
Is this how it would be used?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2025 03:55 AM
Hello @HS7,
Please refer to the below link:
https://www.servicenow.com/docs/bundle/yokohama-integrate-applications/page/administer/import-sets/c...
If it is helpful, please hit the thumbs up button and accept the correct solution by refering to this solution in the future it will be helpful to them.
Thanks & Regards,
Abbas Shaik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2025 04:36 AM
Hi
I've read this document, but I don't understand when temporary entity is necessary.
In what cases should temporary entity be created?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2025 04:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2025 08:01 AM
Hi @HS7 ,
1. What is a Temporary Entity in ETL?
In ServiceNow ETL definitions, a temporary entity is like a scratchpad table in memory during transformation.
* It’s not stored in the CMDB or staging table.
* Exists only during the ETL pipeline execution.
* Used mainly for data preparation, intermediate transformations, or calculations before mapping to a target entity.
2. Common Use Cases
You’d typically use a temporary entity when:
1. You need to preprocess data
Example: Combining fields, cleaning values, normalizing formats before final mapping.
2. You need an intermediate format
Example: Input source structure is very different from CMDB structure, so you first map to a temporary entity, then from that to CMDB entities.
3. You need to break a complex transformation into stages
Example: Step 1 maps raw input → temp entity with simplified schema.
Step 2 maps temp entity → target CMDB class.
4. You can’t directly map from input entity due to access/structure issues
* Sometimes, input entity data isn’t available in the mapping scope (as in your case).
* Temporary entity can hold the needed data so the next mapping step can use it.
3. Your Case
In the condition script for an RTE mapping, I created a temporary entity because I couldn't obtain the value of the input entity, and then mapped the entire input entity data to the temporary entity.
Yes — this is a valid use.
What you’re doing is essentially:
* Capturing the input data into a holding object (temp entity) because it wasn’t directly accessible at the point where you needed it.
* Then using that holding object in later mapping stages.
This approach is often used when:
* The RTE (Real Time ETL) mapping runs in a scope where input entity context changes between scripts.
* You need consistent reference to the same data across multiple mapping steps.
4. Best Practices
* Name temp entities clearly: e.g., tmp_<purpose> so it’s easy to track in the ETL definition.
* Avoid unnecessary copies: Only use temp entities when direct mapping or inline transformation isn’t possible.
* Clean up after use: Although temporary entities are ephemeral, keep the mapping flow lean so they’re not created without reason.
* Document in ETL definition notes why the temp entity is used — helps future maintainers.
5. When Not to Use Temporary Entities
* If you can directly map and transform in a single step — skip temp entities.
* If the transformation logic can be expressed inline in the field mapping script — do it there instead of adding an extra step.
Please appreciate the efforts of community contributors by marking appropriate response as Mark my Answer Helpful or Accept Solution this may help other community users to follow correct solution in future.
Thank You
AJ - TechTrek with AJ - ITOM Trainer
LinkedIn:- https://www.linkedin.com/in/ajay-kumar-66a91385/
YouTube:- https://www.youtube.com/@learnitomwithaj
Topmate:- https://topmate.io/aj_techtrekwithaj (Connect for 1-1 Session)
ServiceNow Community MVP 2025