Frequently Asked Questions for Amazon S3 V2 Connector

Frequently Asked Questions for Amazon S3 V2 Connector

Using Files with Header and without Header

Using Files with Header and without Header

Can I read or write an Amazon S3 file that does not contain a header?
Yes. You can read or write an Amazon S3 file that does not contain a header.
How can I read data from an Amazon S3 file that does not contain a header and write the data to an Amazon S3 file with a header?
Set the following properties in the
Formatting Options
tab when you configure the Amazon S3 V2 source and target properties in a mapping:
  1. In the
    Header Line Number
    source property, enter
    0
    as the line number.
  2. In the
    First Data Row
    source property, enter
    1
    as the line number.
  3. In the
    Target Header
    target property, select the
    With Header
    option.
When you run the mapping task, the Secure Agent reads data from the file that does not contain a header and writes the data to the file adding a header.
If you select the
Create Target
option, the Secure Agent reads data from the file that does not contain a header and generates a file with a header in the target.
For example, you want to read data from the following Amazon S3 file that does not contain a header:
An Amazon S3 V2 file that does not have a header and the data starts from line number 1.
After you set the required properties in the
Formatting Options
tab, the Secure Agent displays the data in the
Data Preview
tab in the following format:
When you preview the data of an Amazon S3 file that does not have a header in the Data Preview tab, the data appears with the header names FIELD0, FIELD1, FIELD2 and so on.
When you run the mapping task, the Secure Agent reads data from the file that does not contain a header and writes the data to the file adding a header in the following format:
The Secure Agent reads data from the file that does not have a header and writes the data to a file with FIELD0, FIELD1, FIELD2, and so on headers.
How can I read data from an Amazon S3 file that does not contain a header and write data to an Amazon S3 file without a header?
Set the following properties in the
Formatting Options
tab when you configure the Amazon S3 V2 source and target properties in a mapping:
  1. In the
    Header Line Number
    source property, enter
    0
    as the line number.
  2. In the
    First Data Row
    source property, enter
    1
    as the line number.
  3. In the
    Target Header
    target property, select the
    Without Header
    option.
When you run the mapping task, the Secure Agent reads data from the file that does not contain a header and writes data to the file without a header.
If you select the
Create Target
option, the Secure Agent reads data from the file that does not contain a header and generates a file without a header in the target.
For example, the Secure Agent reads data from the file that does not contain a header and writes the data to the file without a header the following format when you run the mapping task:
The Secure Agent reads data from the file that does not have a header and writes the data to the file without a header.
How can I read data from an Amazon S3 file that contains a header and write data to an Amazon S3 file without a header?
Set the following properties in the
Formatting Options
tab when you configure the Amazon S3 V2 source properties in a mapping:
  1. In the
    Header Line Number
    property, enter the line number that you want to use as the header when you read data from Amazon S3.
  2. In the
    First Data Row
    property, enter the line number of the Amazon S3 file from where you want the Secure Agent to read data.
    If you want to read data from the header, the value of the
    Header Line Number
    and the
    First Data Row
    properties should be the same.
  3. In the
    Target Header
    target property, select the
    Without Header
    option.
When you run the mapping task, the Secure Agent reads data from the file that contains a header and writes data to the file without a header.
If you select the
Create Target
option, the Secure Agent reads data from the file that contains a header and generates a file without a header in the target.
For example, you want to read data from the following Amazon S3 file that have a header:
An Amazon S3 file that have a header and  the data starts from line number 3.
Set the
Header Line Number
property to
3
and
First Data Row
property to
4
in the
Formatting Options
tab. The Secure Agent displays the data of an Amazon S3 file that have a header in the
Data Preview
tab in the following format:
When you preview the data of an Amazon S3 file that have a header in the Data Preview tab, the data appears with the header.
The Secure Agent reads data from the file that contains a header and writes the data to the file without a header in the following format when you run the mapping task:
The Secure Agent reads data from the file that have a header and writes the data to the file without a header.
How can I read data from an Amazon S3 file that contains a header and write data to an Amazon S3 file with a header?
Set the following properties in the
Formatting Options
tab when you configure the Amazon S3 V2 source properties in a mapping:
  1. In the
    Header Line Number
    property, enter the line number that you want to use as the header when you read data from Amazon S3.
  2. In the
    First Data Row
    property, enter the line number of the Amazon S3 file from where you want the Secure Agent to read data.
  3. In the
    Target Header
    target property, select the
    With Header
    option.
When you run the mapping task, the Secure Agent reads data from the file that contains a header and writes data to the file with a header.
If you select the
Create Target
option, the Secure Agent reads data from the file that contains a header and generates a file with a header in the target.
For example, you want to read data from the following Amazon S3 file that have a header:
An Amazon S3 file that have a header and  the data starts from line number 3.
Set the
Header Line Number
property to
3
and
First Data Row
property to
4
in the
Formatting Options
tab.
The Secure Agent reads data from the file that contains a header and writes the data to the file with a header in the following format when you run the mapping task:
The Secure Agent reads data from the file that have a header and writes the data to a file with a header.

0 COMMENTS

We’d like to hear from you!