Previous page | Data Integration | Next page |
Configuring the Data Import |
The Data Import component has three tabs:
SourceSpecify the file type: CSV or XML Your choice will affect the display of the remainder of the Data Import component. For CSV filetype only:
For all filetypes: Specify the Request (optional) This section is used when the file import will be triggered via a request from a server. If the file will be uploaded to the site this should be left blank. Request type - GET (the http request type) Request URLs
If the you add more than one URL, a request will be made in the displayed sequence, until one responds. This is to provide a failover capability if the first URL is offline. AuthenticationIf the feed requires you to use Basic Authentication, enter the Username and Password, otherwise leave these fields blank. Note: If you need to authenticate by giving your credentials as part of the querystring, add them to the Request Parameters. Request Parameters
There are four types of parameter you may add:
Text parameter For the parameter, enter the:
Example: if you want the request url to contain color=yellow, set Name to 'color' and Value to 'yellow' Table Field parameter This is used when a value will be passed in from a query request, with the value being linked to a table field Enter the:
Example: if you have a Query by Example view set up on a Query that used the Data Import component, if the user enters a value to search for in the Query by Example, that value will be used here. Timestamp parameter Used in conjunction with signatures to prevent replay attacks Enter the:
Signature parameter Used to sign the request. If used this is usually the last parameter. Enter the:
Test Request This allows you to test the request and run an import without configuring a Query and Query by Example. If there are any Request parameters configured of type Table Field, they will be listed here so you can enter the values for them. Fill these in, and press the 'Make test request' button. The test will run, and a dialog will show the outcome,along with the raw file returned to be imported. DestinationTable - specify the Table that will receive the imported data. If the data will be imported into several tables, specify the main table here, and the related tables will be specified later in the configuration. For CSV filetypes only: Field Mappings For each field in the import file that you wish to import, Add an entry. This shows the Field Mapping dialog This contains the following settings: CSV Identify the field.
Leave this blank if later in this dialog the Table Field will be of datatype Record Link or Multiple Record Link and the Against Multiple Fields option is selected, since the field(s) in the CSV file will be specified in the subsidiary dialog. JSON Query (relative to record) Examples: if the JSON record is: [{"Name":"Text","Name2":"Text2","Name3":{"Sub1":"Sub1Text","Sub2,Sub2Text"}]
Table The Table specified earlier in the configuration is confirmed here. Click 'Edit...' if you need to modify the Table. Table Field The field within the Table where the value will be stored. If you choose fields of type Record Link or Multiple Record Link, additional settings will appear. Response value prefix & Response value suffix Any values entered here will be used to modify the imported value before it is stored. Include in cache control Cache control determines whether the target table is deemed to already contain the relevant data (ie it is cached in the site), so the record need not be imported, or not, in which case the record should be imported. Additional settings for fields of type Record Link and Multiple Record Link: Against Select whether the value should be matched against
Create linked record if not found Check this to create a new record in the linked table if an existing match is not found. The new record will have the imported value(s) in the relevant fields (except for Record Identifiers when they are made of a combination of fields). If checked the following option becomes available: Create linked record if all field values are empty Check this to create a new record in the linked table even if all the values relating to the linked table are empty. Leave this unchecked to avoid creating such a blank record in the linked table. Linked Table Field Mappings dialog If the Against settings is set to Multiple Fields, click the adjacent button to open the Linked Table Field Mappings dialog. This contains the following settings: Table The table the Record Link or Multiple Record Link is linked to is confirmed here. Click 'Edit...' if you need to modify the Table. Field Add one or more fields from this table. This shows a Field Mapping Dialog. Per record sequence index in CSV file This is shown only if the dialog was called from a Multiple Record Link field. This allows the multiple records that are being added in the linked table to be sequenced. The field should be identified using either a number or letters. The field identified should contain an integer value. Cache control at this level matches Cache control determines whether the target table is deemed to already contain the relevant data (ie it is cached in the site), so the record need not be imported, or not, in which case the record should be imported. When examining records in this linked table to find a match, it can either look for a match over all records in the table, or restrict the search to records linked to by the record at the lower level. Select either:
|