CSV Data Source
Last Updated: 05 Jul 2016
The CSV Data Source allows you to upload a comma-separated value (CSV) file of information. For each row listed in the file, a shadow asset is created, which can be in such assets as an Asset Listing.
Bookmarks to the headings on this page:
Once you have created your CSV Data Source, you can configure the asset on its associated screens. Many of these screens are the same or similar to those for a Standard Page and are described in the Asset Screens manual. For more information on the Record Filter and Dynamic Inputs screens, refer to the DB Data Source chapter in this manual.
In this chapter we will only describe the Details screen, which is different for a CSV Data Source.
The Details screen for a CSV Data Source allows you to upload the CSV file and create shadow assets in your system. For more information about the Status, Future Status and Thumbnail sections of the Details screen, refer to the Details Screen chapter in the Asset Screens manual.
This section allows you to change the details for the CSV Data Source. The fields available are as follows:
- Name: by default, the name that was entered when the CSV Data Source was created will appear in this field. You can change the name by clicking into this field and entering the new name of the CSV Data Source.
- Use first row as attribute names?: select whether or not to use the first row of the CSV file as field names for the shadow assets. If you select No in this field, the CSV file will be imported into one shadow asset instead of one shadow asset per row.
- Use first column as row identifier?: select whether or not to use the first column of the CSV file as the identifier for the rows below it.
Upload new CSV file
This section allows you to upload the CSV file you want to use to create shadow assets.
In the CSV Upload field, select the file that you want to upload and click Commit. The shadow assets will be created under the CSV Data Source in the Asset Map. For more information on shadow assets, refer to the Shadow Assets chapter in this manual.
Selecting the Compare Format for Uploaded CSV to Existing Contacts field will allow Squiz Matrix to check the content of the CSV file being uploaded to ensure that it is consistent with the format of the current CSV file. If the system finds that the format is different, the upload process will be aborted and the previous CSV data will be restored.
Shadow Asset Name
Once you have uploaded a CSV file in the CSV Upload field, the Shadow Asset Name section will appear on the Details screen.
This section allows you to specify the name of the shadow assets as well as providing a list of keyword replacements that can be used for the shadow assets. The fields available are as follows:
- Enter the Name of the Shadow Assets: this field allows you to specify the name of the shadow assets. It can be either a normal string or a combination of strings and keyword replacements.
- Available Keywords for the Data Source Record Set Asset: this section provides a list of available keyword replacements for the shadow assets. You can use any combination of these keyword replacements as well as string as the name of the shadow assets.
Steps to Creating a CSV Data Source
To create a CSV Data Source, follow the steps outlined below.
- Create a CSV file with the data that you want to important into your system. The first row of the CSV file will be used as the name of the fields for the shadow assets. An example CSV file is shown below.
FirstName, LastName, StreetName, Suburb, State, Postcode
John,Doe,120 jefferson st.,Riverside,NSW,2000
Jack,McGinnis,220 hobo Av.,Phila,QLD,4569
Pam,Smith,120 Jefferson St.,Riverside,VIC,3256
- Create a CSV Data Source in your system.
- On the Details screen, in the CSV Upload field select the CSV file and click Commit. The shadow assets will be created under the CSV Data Source in the Asset Map.
Updating the Data in the Shadow Assets
Once you have created a CSV Data Source, to update the data you need to change the data in the CSV file and re-upload it on the Details screen. Once you have done this, the shadow assets will be updated with the new information.