Importing Data Flashcards
What three things are recommended to do before importing data into ServiceNow?
- Understand what data you are bringing in
- Decide what to do with incomplete or erroneous data
- Create a plan to map the source file columns to the target table columns
———————————————————————
📁 Importing Data Developer Documentation
Why is it important to examine data when you are importing with ServiceNow?
It is much harder to remove unwanted data than it is to plan in advance.
———————————————————————
📁 Importing Data Developer Documentation
When preparing data for import into ServiceNow, what does it mean to “map data”?
To create a plan to map columns from the source data to fields in the target table.
———————————————————————
📁 Importing Data Developer Documentation
What do data sources do?
Data sources define what data should be imported
———————————————————————
📁 Importing Data Developer Documentation
Where would you create data sources for a scoped application?
In Studio
———————————————————————
📁 Importing Data Developer Documentation
What role do transform maps play in the import process?
Transform maps match the columns from the staging table to the columns in the target table.
———————————————————————
📁 Importing Data Developer Documentation
What does running a transform map do?
Imports data from the staging table into the target table.
———————————————————————
📁 Importing Data Developer Documentation
What is the last step in importing data?
&
Where is the first place to look?
Verify that the records contain the expected data in the expected format.
&
The first place to look is the import set.
———————————————————————
📁 Importing Data Developer Documentation
What is something important to remember about import sets and mandatory fields?
ServiceNow does not force import sets to provide values for all mandatory fields on a table.
The Enforce mandatory fields option on a Transform Map determines if mandatory fields are required to have values when importing data.
The 3 options for this field are
No: Mandatory target table fields do not require values on import
Only Mapped Fields: Staging table fields mapped to mandatory target table fields must have values.
All Fields: All mandatory target table fields must have values
———————————————————————
📁 Importing Data Developer Documentation
It’s important to plan how to handle collisions (between the source data and the target table) before importing data.
What are some of the potential options?
- Keep the record already in the target table?
- Overwrite the record in the target table with the source data?
- Create duplicate records?
———————————————————————
📁 Importing Data Developer Documentation
What is an easy strategy to determine whether or not a row in the staging table matches a record in the target table.
Use the Coalesce option in a Transform Map Field Map.
The Coalesce option makes a field a record’s unique key.
Set the Coalesce value to true to use a field to check for collisions.
———————————————————————
📁 Importing Data Developer Documentation
What are the major tips for using / things to remember about the Coalesce option when importing data?
- Coalesce on enough fields to be able to uniquely identify a record. Coalescing only on the user field on the incident list wouldn’t be sufficient to uniquely identify records because a user could have multiple different incident records open.
- When coalescing on multiple fields, all coalesce fields must be a match for there to be a collision
- Matching some coalesce fields but not all does not produce a match
- If a match is found using the coalesce fields, the target record is updated with the information imported from the staging table
- If no match is found, a new record is inserted in the database
- If no fields are coalesce fields, records are always inserted on import
———————————————————————
📁 Importing Data Developer Documentation
What do Transform Event Scripts Do?
&
When do they run?
Transformation Event Scripts modify the transformation behavior at different points in the transformation process
&
Transformation events occur during the process of transforming an import set table onto a target table.
———————————————————————
📁 Importing Data Developer Documentation
The When option in the Transform Script trigger specifies when in the transformation process script should run
What are the When field choices and their meanings?
- onStart: executes at the start of an import before any rows are read
- onAfter: executes at the end of a row transformation and after the source row has been transformed into the target row and saved
- onBefore: executes at the start of a row transformation and before the row is transformed into the target row
- onChoiceCreate: executes at the start of a choice value creation before the new choice value is created
- onComplete: executes at the end of an import after all rows are read and transformed
- onForeignInsert: executes at the start of the creation of a related, referenced record before the record is created
- onReject: executes during foreign record or choice creation if the foreign record or choice is rejected; The entire transformation row is not saved
———————————————————————
📁 Importing Data Developer Documentation
In Transform Scripts, the action string variable, which is automatically created, has two possible values. What are they?
&
When is the action variable set?
&
What happens when the automatically created ignore boolean is set too true?
insert and update
&
After coalescing determines if there is a match (update) or no match (insert).
&
When true, the ignore variable stops the transformation process for the source data row.
———————————————————————
📁 Importing Data Developer Documentation