CSV adapter module


The CSV adapter module contains the following processes:

Write process

The Write process writes rows to a specified CSV file. If a file already exists, the Write process overwrites the rows in the file, without any indication.

The following table describes the process inputs for the CSV adapter with the Write process.

CSV adapter Write process inputs 

Input

Description

Required

<adapter name>

Specifies the name of the adapter to use for this process 

Default value: CSVAdapter

No

<file-name>

Specifies the absolute path and the file name of the file, in which you want the adapter to add data

Yes

<delimiter>

Specifies a character that is used to indicate the end of one field and the beginning of the next

Default value: (,)

No

<text-qualifier>

Specifies a character that differentiates field data from a delimiter

Each field's data is between the text qualifier.

For example, the field data contains a comma and a comma is used as a record delimiter, then text qualifier must be used to distinguish between the comma’s in the data and the comma’s used to delimit fields.

Default value: (")

No

<preserve-spaces>

Specifies whether to preserve spaces between the rows in a CSV file

Valid value: true, false (default)

No

<charset>

Specifies the supporting CharSet 

Also called character set, it includes identifiers describing a series of universal characters.

No

<rows>

Specifies a row to be added to the CSV file

Contains the columns element.

Yes

The following table describes the process output parameter for the CSV adapter with the Write process.

Write process output 

Process output

Description

adapter response

Specifies the CSV adapter's response

The following table lists the sample delimiter formats.

Sample delimiter formats 

Delimiter

Format

tab

\t

pipe

\ |

asterisk

\ *

dash

\ -

comma

, OR \,

semi colon

; OR \;

underscore

_ OR \_

dollar sign

\$

double quotation marks

&quot;

Read process

The Read process reads the data in the CSV file. The following table describes the process inputs for the CSV adapter with a Read action.

CSV adapter Read process inputs

Input

Description

Required

<adapter name>

Specifies the name of the adapter to use for this process 

Default value: CSVAdapter

No

<file-name>

Specifies the absolute path and the file name of the file, which you want the adapter to read

Yes

<delimiter>

Specifies a character that is used to indicate the end of one field and the beginning of the next

Default value: (,)

No

<text-qualifier>

Specifies a character that differentiates field data from a delimiter

Each field's data is between the text qualifier.

For example, the field data contains a comma and a comma is used as a record delimiter, then text qualifier must be used to distinguish between the comma’s in the data and the comma’s used to delimit fields.

Default value: (")

No

<read-headers>

Specifies whether to read the first row in the data as column headers

Valid values: true, false (default)

No

<start-index>

Specifies the row from where the adapter starts reading the rows in the CSV file

Default value: 0

If the <start-index> is 0, all rows in the CSV file are read.

No

<maximum rows>

Specifies the number of rows to be read from the CSV file starting from start index

For example: if the <start-index> is 5 and <maximum-rows> is 10, in the CSV file, rows 5 to 15 are read.

Default value: 0

No

<charset>

Specifies the supporting CharSet 

Also called character set, it includes identifiers describing a series of universal characters.

No

The following table describes the process output parameter for the CSV adapter with the Read process.

CSV adapter read process output 

Output

Description

adapter response

Specifies the CSV adapter's response 

The format varies based on the inputs provided.

Delete process

The Delete process deletes a specified file. The following table describes the process inputs for the File adapter with the Delete process.

CSV adapter Delete process inputs 

Input

Description

Required

<file-name>

Specifies the name and location of the file in which you want to delete specified rows

Yes

<delimiter>

Specifies a character that is used to indicate the end of one field and the beginning of the next

Default value: ,

No

<text-qualifier>

Specifies a character that differentiates field data from a delimiter

Each field's data is between the text qualifier.

For example, the field data contains a comma and a comma is used as a record delimiter, then text qualifier must be used to distinguish between the comma’s in the data and the comma’s used to delimit fields.

Default value: (")

No

<read-headers>

Specifies whether to read the first row in the data as column headers

Valid values: true, false (default)

No

<charset>

Specifies the supporting CharSet 

Also called character set, it includes identifiers describing a series of universal characters.

No

<start-index>

Specifies the row from where you can start deleting the rows in the CSV file

Default value: 0

If the <start-index> is 0, none of the rows are deleted from the CSV file.

No

<maximum rows>

Specifies the number of rows to be deleted from the CSV file starting from start index

Default Value: 0 (No rows are deleted)

For example: if the <start-index> is 5 and <maximum-rows> is 10, in the CSV file, rows 5 to 15 are deleted.

No

The following table describes the process output parameter for the File adapter with the Delete process.

Delete process output 

Output

Description

adapter response

Specifies the CSV adapter's response

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*