Asset Importer
Asset importers are used to import assets of any asset type into Txture.
Introduction
The asset importer creates new assets in Txture based on the data provided by a Data Source. Each row in the data source typically corresponds to one asset in Txture.
If you have not created an importer from a data source page, you need to specify the desired data source and, depending on the data source, the format the data is in. If you are unsure about the data format, loading the preview on the right-hand side can help.
Type resolution
For asset importers you need to define the Type Resolution to determine which asset type in Txture the imported data should be mapped to.
- Constant Type: The source provides data for a single asset type in Txture. All rows will be imported as assets of the selected type.
- Dynamic Type: The asset type in Txture is inferred by identifying the type from one of the columns in the data preview. This is useful when a single data source contains multiple asset types.
Dynamic type mapping
In case the naming scheme in your data source does not match the asset types as defined in your Structure, you can use a dynamic column to adapt it and refer to that column instead.
Asset ID
For asset importers it is necessary to specify which column of the transformed preview holds the Unique ID by selecting the according column from the drop-down menu of the field Column containing Asset ID. This is critical as assets are linked to this ID at their data source.
The Asset ID serves multiple purposes:
- If the values in the data source at this ID change, the property values in Txture will be updated accordingly.
- If the ID vanishes in the data source, the asset will be deleted from Txture.
- When importing links, these IDs can be used for Importer match rules: if a data source returns the same IDs that have been assigned as an ID at source for assets, they can be used to create links.
- If an ID occurs multiple times, only the first occurrence is imported. This is useful if an asset occurs multiple times in the data source.
Choosing a unique ID
The Asset ID needs to be something unique. If you are importing virtual machines, the hostname is a good option. If no column in your data provides uniqueness, you can use a dynamic column to generate a unique identifier. This allows you to execute the importer with an updated data source in which the order of elements might be different, while still being able to identify assets based on their ID.
Property mapping
The preview on the right-hand side provides a look up of the extractable data for the Property Mapping. This mapping is the final step to translate data from an external source to properties in the Txture instance.
Warning:
The data must be in the format Txture expects for the target property. If your data requires transformation, use a dynamic column to convert it to the correct format and map the dynamic column instead.
A common example is enumeration properties like "Deployment Environment", which accepts specific values such as Local, Development, Integration, Testing, Staging, or Production. If your input data references the environment as "Test", it needs to be transformed to "Testing" to be accepted as a valid value. Perform this transformation in a dynamic column and map that column instead of the original one, while leaving other values untouched.
With a click on + Add mapping you can create a new property mapping. The Input drop-down menu lists all columns shown in the transformed preview and the Target property in Txture drop-down menu lists all properties available in Txture.
There are three types of mappings:
- Column: The most common type. Dynamically maps a column value to the property of the asset in the same row.
- Fixed value: Maps a static value to the property of all imported assets.
- Not set: Sets the property to NULL (non-existent) for all assets. This is useful to correct incorrect data from previous imports.
Example
In the example above, the data source provides two columns (cpu and ram) that we want to map to Txture's data model. Within Txture, we have the corresponding properties CPU Cores and RAM. So we can map the values of the column cpu to the CPU Cores property in Txture. For the property RAM, we also need to define the Unit size of our input, which in our case is given in MiB.
Priority
Txture allows to set a priority for each property. The priority comes into play if several importers have information on the same property. Setting a higher priority will configure Txture to prefer input of this importer over values of other importers. If the higher-rated importers do not provide a value, the values of importers with lower priority will be considered one by one.
A particular case for the priority is the threshold above which importers overwrite manual changes (e.g. from the survey). The default priority for manual changes is 5, but this can be configured in the System Configuration (setting "Priority of Manual Changes").
Propose mapping
The button Propose Mapping can be used to get suggestions for the mapping. This feature becomes more intelligent if the properties are tagged accordingly. This can be done in the Structure Editor. If no tags are available, a simple string matching is attempted.