Data Fragments in Data Source
Consider a supplier who:
- Maintains a record description SQL database that is indexed by a SKU code with English descriptions for all records sold.
- Has a flat file maintained by the IT department that identifies the UPC codes for each SKU.
- Has a Microsoft Excel file with the current list price for each record.
Each of these data fragments is identified in the data source.
- Data Source Transfer Mode: Data sources can be uploaded through manual upload using the UI or FileWatcher, and using FTP transport. For FTP transfers, the input file is first copied from its location at the specified FTP address.
- Data Source Upload: During the upload, the data source profile is verified and data is moved to the application.
- For a manual upload, you are prompted for a file residing on a system network. When the loading is complete, the file created on Microsoft Windows is automatically converted to the correct format for use on the server.
- For an FTP transport profile, an FTP get action is used.
- For an SQL data source no file is required, instead the source database is queried. Existing data from the database can be accessed in the following two ways:
- Using a source table
When a source table is defined it does not copy the data from a source table to the application. Instead, it simply links to it. During an upload, the associated table is verified and the row count is calculated, but the data is not copied over.
- Using a select SQL statement
When a SQL statement is specified as a source, the result of the select statement is copied and stored within the application during the upload.
- Using a source table
Once the data source is created, you must execute Upload to validate the data source. Subsequently, the upload is needed only if the data in the underlying table changes.
If SQL data sources are used in a rulebase, the data changes in the underlying table are not automatically visible in the rulebase unless an Upload action is executed. If the data source contains any Date type attributes, all such attributes must have the same date format. The correct date format must be selected when defining data sources. This applies even when attributes that contain date data are defined as a string type. If such date attributes are mapped to any date attributes while defining input mapping for a repository, the date format specification is required.
- Data Source Upload Return Codes: Data source upload event success and error return codes are as follows:
- When there is an error during a data source upload, the step status displayed is Error. For example, when there is a TNS Error, which occurs when the Oracle client is not configured correctly, the step status is displayed as Error. The event is also displayed with an error status.
- Data source upload event proceeds even if the number of rows uploaded is zero (0). The event status is "success" and the number of records uploaded is displayed as zero.
- Uploading a data source is considered successful if the number of records uploaded are the same as the number of records present in data source file or table.