Importing into fields on extended (child) tables
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2013 09:07 AM
I want to import multiple types of CIs into the CMDB using a single import file so I have a Transform Map in which the Target is the cmdb_ci table. As far as importing into specific extended tables, this can be done by setting the target.sys_class_name during the import.
My question is, is there a way to import into fields that would only exist on an extended table? From a Field Map point of view, the Transform Map only has access to fields directly on the cmdb_ci table. But my import file includes data that needs to be imported into fields that exist on extended tables.
Is there a way to do this within the Transform Map?
Thanks,
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2013 11:02 AM
You can't import into extended tables without scripting I believe.
Here are two other methods I've used before:
Method 1: CI Type
1. Have one datasource for your import file.
2. In your import file, have a CI Type
3. Transform maps for each cmdb_ci table you want to import into.
4. In each transform map, have a onBefore transform script the filters out the CI Type you want to import. For example if you CI Type in your file is Computer and you are importing to the cmdb_ci_computer table, have a statement like
if (source.u_ci_type != 'Computer') { ignore = true };
Method 2: Partial Loads
Another method is to have 1 datasource and import all the cmdb_ci table data first in a transform map, cmdb_ci_computer data next in a transform map, etc. This works if you don't have a CI Type in your file sometimes.
With both of these methods, you have to be careful about duplicates, so choose the coalease carefully.