The DatasourceInterface section consists of attributes specifying the connection and the connection type between the Adapter and data source. There are two types of interface, file and SQL. The main difference between the two is that for files, the Files collection is required, and for SQL, the queries collection is required.
The DataSourceInterface section also defines the way in which the Adapter manages the source file (whether it deletes the original file if it was created only for the Adapter, or whether it leaves the data if it is needed for other uses, and so on).
For file Adapters, to read and parse ASCII files, the files interface is used as shown in the following figure. Choose the following values for the settings as follows:
The Files section under the DataSource Interface node relates to the connection to the data source. Configure the following attributes.
Note: This section looks completely different for an SQL adapter.
In cases where a file is created only for the Adapter and it can be deleted after processing, it should be set it to "yes". The file is then renamed, processed, and deleted.
When set to "no", the file is copied and the processing takes place using the copied file. If new records are appended to the end of this file, the Adapter copies these new records to the work file during the next cycle. If new records are not appended to the file, the Adapter searches for the next file with the same pattern and name (in lexicographic order) as the current file. If the Adapter finds such a file, work proceeds on this file. The Adapter does not revert to the previous file even if new records are appended.
Set to "no" when you need to keep the integrity of the source file and when the file should be appended.
In this example, if the wildcard character '*' is used, then the attribute values is "ServerData*.csv". (The Adapter reads all files with names that begin with ServerData and have the extension, .csv.)
Important! It is recommended that a date and time are added to the end of the filenames using the following format YYYYMMDD-HHMISS to ensure that the files are sorted correctly, read in the correct order, and that none of the files are missed. The Time portion can also be added if there are multiple files being produced each day.
The data source file in this example is a CSV (comma separated) file. The simplest way of parsing such files is to specify the comma as a delimiter.
Other methods available for parsing are:
|
Copyright © 2013 CA.
All rights reserved.
|
|