Import set table

As a first step, we will create an import set table using the Load Data module. Open the System Import Sets | Load Data module, as shown in the following screenshot, and fill in the form using the following values:

  • Import set table: Select Create table
  • Label: Booking Req Import
  • Name: (This field will be automatically populated)
  • Source of import: Select File
  • File: (Choose the file we exported earlier in the chapter)
  • Sheet number: 1
  • Header row: 1

The Label and Name fields tell us the label and name of the new table that will become our import set staging table. The source of the input that we are selecting here is a file, as we will upload a CSV file that contains rows that will be inserted into the new staging table being created. The sheet number is useful when we are trying to upload an Excel file that may contain more than one worksheet. Similarly, the header row number field is used to specify the row number that contains the column headers. Selecting an existing table option is useful when we are uploading a file the with same columns (but updated or newer rows entries) for which we have already created an import set table:

Now, click on the Submit button to upload the CSV file and be taken to the next page. Depending on the size of the file that you select, it may take some time for the upload to complete.

When the file is uploaded, the first task that the system performs is to create a new import set table. The system parses the columns in the header row of the uploaded file and creates columns with the same name in the import set table. Furthermore, the system samples only the first 20 rows of the uploaded file in order to determine the data type and size of each column.

Once the import set table is created, the system picks each row from the uploaded CSV file and inserts records into the import set table. If the system fails to insert a row, it jumps to the next row and continues trying to insert the remaining records. The system may update a record if all the values of a row match a record in the import set table. We can control these behaviors by changing the system properties, which you will learn about later in the chapter. Once the process is complete, we will be presented with a confirmation message, as shown in the following screenshot, along with the total number of rows processed and the number of records inserted, updated, or skipped:

The next step is to ensure that the data we uploaded has inserted properly into the import set table. We can open the Import Sets module by clicking on the Import Sets links under the Next steps... section. As shown in the following screenshot, the list of records page will show us the newly created import set:

Every attempt to upload new data will create a new Import Sets entry and will be linked to at least one import set table and a source. Each Import Sets is given a unique number that begins with ISET and is followed by 7 digits. The state of the import set is used to determine the status of the import set and tell whether the data is currently loading, loaded, processed, or canceled.

Now, click on the import set number to be taken to the detail page of the import set, as shown in the following screenshot. It is recommended not to change any values in any fields, except the Short description field. The transform related link under the form can be used to configure the transform map for the import set if it is already not defined or to run an existing transform map if it is already defined:

The Import Sets Rows related list below the main form, as shown in the following screenshot, can be used to view all the records that are uploaded to the instance using the load data module. The list is useful for determining if there were any errors while loading the data. It can also be used to find the target record that will be inserted or updated when we transform the import set.

Furthermore, the State field can be used to learn about the status of the transform process. If the row gets properly inserted or updated into the target table, the State field will be marked as inserted or updated, respectively. In case there is an error while trying to insert the row into the target table, the State field will be marked as an error. The state of pending means that the records have been inserted into the staging table and are awaiting the transform process to be completed, which you will learn next:

As shown in the following screenshot, we can take our mouse over to each info icon to quickly look through some records to determine if the column headers and row values in the source CSV file mapped and uploaded into the import set table properly. This is a recommended process for when we are trying to use an existing table while loading the data, as, chances of selecting a different source that might have a different column structure is high in such a case:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.154.208