One Record Per File If you want to save Edit the agent.xml file with the following configuration changes ( one record per file )Within the <task> tag, nest , use the following directives:
Directive | Example | Use | Required? |
---|
<handler> | <handler>com.perspectium.replicator.file.XMLFileSubscriber</handler> File Type | Value |
---|
CSV | com.perspectium.replicator.file.CSVFileSubscriber | JSON | com.perspectium.replicator.file.JSONFileSubscriber | XML | com.perspectium.replicator.file.XMLFileSubscriber |
| The name of the file handler class | Yes | <one_record_per_file> | | This directive will tell the agent to save each record into its own file instead of saving all records together in a single file. | Yes | <files_directory> | <files_directory>/Downloads/subscribefiles</files_directory>
| The directory that contains the file of the saved records | Yes | <file_prefix> | <file_prefix>record</file_prefix> | A prefix for the file name of each record. If this directive is not specified, “psp.replicator.” will be used as the prefix. | No | <file_suffix> | <file_suffix>.xml</file_suffix>
| A suffix for the file name of each record. If this directive is not specified, “.xml” will be used as the suffix. | No | <translate_newline> | <translate_newline>nbsp</translate_newline>
| This directive will replace record content newline entries with a non-breaking space. | No |
Anchor |
---|
| multiple_file |
---|
| multiple_file |
---|
|
Records to Multiple FilesIf you want to save your records to multiple files, use the following directives:
Directive | Example | Use | Required? |
---|
<handler> | <handler>com.perspectium.replicator.file.XMLFileSubscriber</handler> File Type | Value |
---|
CSV | com.perspectium.replicator.file.CSVFileSubscriber | JSON | com.perspectium.replicator.file.JSONFileSubscriber | XML | com.perspectium.replicator.file.XMLFileSubscriber |
| The name of the file handler class | Yes | <buffered_writes> | <buffered_writes>250</buffered_writes>
| A number of records to buffer before writing to file (to improve performance and not write to the file upon reading each record) | Yes | <files_directory> | <files_directory>/Downloads/subscribefiles</files_directory>
| The directory that contains the file of the saved records | Yes | <file_prefix> | <file_prefix>record</file_prefix>
NOTE: Use the value $table_$d{yyyyMMdd}_$i to set a dynamic prefix value where yyyyMMdd can be modified to different date format.
Code Block |
---|
| <file_prefix>$table_$d{yyyyMMdd}_$i</file_prefix> |
| A prefix for the file name of each record. If this directive is not specified, “psp.replicator.” will be used as the prefix. | No | <file_suffix> | <file_suffix>.xml</file_suffix> File Type | Value |
---|
CSV | .csv | JSON | .json | XML | .xml |
| A suffix for the file name of each record. If this directive is not specified, “.xml” will be used as the suffix. | No | <separate_files> | <separate_files>table</separate_files> | Indicates that the files will be separated by table. | Yes | <enable_audit_log/> | <enable_audit_log/> | A self-closing directive that will generate an audit file. The audit file has information about when the records are processed, name of the file, and number of records processed. | No | <translate_newline> | <translate_newline>%13</translate_newline> NOTE: This is a required directive for JSON files.
| This directive will replace record content newline entries with the value you input. | Varies
|
|