Skip to main content

Importing from Excel files

Txture allows to import data from various sources. We would always suggest to start to connect the dynamic datasources, like AWS, Azure or VMware for example. When using a dynamic API connection, the importer can be run multiple times and automatically updated with any changes in the data source.

If there is no dynamic data source and importer, a static excel export and import is a valid option to get your data into Txture.

Info:

This process works the same with CSV files. The only difference being, that for CSV files you would have two separate files, one for each sheet of the Excel file.

In this tutorial, an example will be covered in which all the necessary steps to get the data into Txture are explained. More information on the individual steps can be found in the respective Administration and Txture Core documentation.

For the scenario in this tutorial, we assume the following:

  • We have an Excel file listing some application assets. Download the file here.
  • In the Excel file there is a second sheet that lists application owners.
  • We want to import the applications and link them to their application owners.

Step 1: Investigating the Excel File

In the example Excel file, there are two sheets so we end up with two asset importers that we run one after each other.

Step 2: Preparing the Data Source

Since most likely your Txture instance operates on a server and not on your local machine, the next step is to transfer the Excel file to a location where Txture can access them. There are several options depending on whether you want to get started quickly or are planning for a long-term solution (with updates):

  • Upload the file to a File-Upload Data Source: The most straightforward and easiest solution is the usage of a File-Upload Data Source. These allow to upload th Excel files and select them to read from in the creation of the importer in step 3.

  • Txture Excel-Upload: You can use the Txture Excel-Upload data source. In this data source you first need to select what you want to import. An Excel File will be generated with the right format for your data upload into txture.

  • Copy-paste them to Txture directly: Txture allows the creation of text data sources - basically text fields in which you can copy-paste information. Of course this way your information will not stay up-to-date if you change it locally, nevertheless, it might be a good quick starting point.

  • Store them on a folder on the server: If you use an On-Premise version of txture, you can upload your data the folder data source to access your files.

  • Upload them to an S3 bucket: If neither of the above is a good solution, you might want to upload your files to S3 and use the S3 data source to retrieve them. This way you can update from any location and Txture will find new information.

Info:

Please note that creating data sources (and importers) requires admin permissions in Txture.

Step 3: Configuring the Asset Importer

It is now time to actually import the applications using an asset importer. Proceed to ( Admin / Importers) to create a new asset importer.

Give the importer a descriptive name and hit Save.

You are now presented with a the importer configurations. For this how-to guide, we will stick to a simple approach, configuring only the absolutely required options.

  1. Choose the newly created data source and the appropriate data format (Spreadsheet (xls, xlsx)) as the file format. For this example we are going with an Excel import.
  2. After selecting the Excel file and the sheet within the Excel file to import, click on Load preview to see a first glimpse of the data.
  3. You might also want to select that a header row is available if this is the case in your data file (it is in the example data files).
  4. The asset type setting allows you to select which asset type you want to import. In this case, all of our lines are applications so we can use a constant type and select the asset type Application as our target asset type.

  1. Since we are using a perfectly configured data format and no transformation is needed, you can now continue to the Mapping section. This section allows you to configure, which column in the file is mapped to which property in Txture.

  2. It is important to know that the values in the field selected for the Column containing Asset ID must be unique over all imported lines.
    You can now proceed to map the columns in the uploaded file to properties in Txture.

  3. Save your configurations of the importer. If you want to have a test run, you can use the Dry Run now button. This will show you the results without entering data into you txture.

  4. If you are happy with the configuration click Run Now to actually start the data import.

Info:

All importers in Txture are syncing. That means that running them again produces the same result (if the original data hasn't changed). So feel free to try and run the importer again. The statistics will show that 2 lines have been loaded (meaning have been found in the data source), but 0 have been imported (because they haven't changed).

The next step after importing applications is to import the application owners from the second Excel sheet.

Links in Txture are connections between two asset types. In our example, the link between the asset types might be:

Application -> owner (this is the link name) --> Stakeholder

The crucial factor when importing links is how to determine where to attach the links to. Txture offers two options to match the sources and targets of links:

  • based on one or more properties
  • ID-based

Depending on the data set about to be imported even a combination of the two is an option. When looking at the data of our example Excel file, we can see that the ID of the application owner is not used in the applications tab. Thus, in this case, we need to use property matching on the target asset type (Stakeholder) and can use an ID-based matcher for the source asset type (Application). The Conditions section thus looks as follows:

Once you have the importer configured , you can Save the importer and run it.
Now you have successfully imported assets and linked them in Txture.

Info:

Importing data correctly into Txture is an important part of the data collection process and the base the next steps in Txture. More detailed instructions and configurations for different data sources & importer types are explained in our Data Sources and Importers documentations.