File System - Dataset to CSV
Declaration
<AMFILESYSTEM ACTIVITY="dataset_to_csv" DESTINATION="C:\temp\Archive\dest.csv" RESULTDATASET="myDataset" DELIMITER="semi_colon" OVERWRITE="YES" />
Description: Retrieves data currently populated in a dataset and outputs the data onto a comma-separated values (CSV) file.
Practical Usage
Used to the movement of data between programs that natively operate on incompatible (often proprietary) formats. For example, a user may need to transfer data previously populated onto a dataset (with the use of the CSV to dataset activity), and output the data onto a new CSV file.
General Parameters
Property |
Type |
Required |
Default |
Markup |
Description |
---|---|---|---|---|---|
Dataset |
Text |
Yes |
(Empty) |
RESULTDATASET="myDataset" |
The name of the dataset from which to extract data. |
Destination |
Text |
Yes |
(Empty) |
DESTINATION="c:\temp\file.csv" |
The path and filename of the .csv file in which to output the data. This can be a fully qualified path and filename (preferred) or a /filename only (requires use of the Change Folder activity). |
Overwrite if file already exists |
Yes/No |
No |
No |
OVERWRITE="YES" |
If set to YES, matching destination files will be overwritten. If set to NO (default), matching files will not be overwritten, however, a runtime error will occur when a matching file exists. |
Advanced Parameters
Property |
Type |
Required |
Default |
Markup |
Description |
---|---|---|---|---|---|
Include column names |
Yes/No |
No |
Yes |
INCLUDECOLUMNNAMES="NO" |
If set to YES, will treat the first line of the CSV data as column headers. If set to NO, column headers are ignored. |
Delimiter |
Text (options) |
Yes |
Comma |
|
The character to be used to separate the tabular values once they are extracted to the .csv file. The available options are:
|
Description tab - A custom description can be provided on the Description tab to convey additional information or share special notes about a task step.
Error Causes tab - Specify how this step should behave upon the occurrence of an error. (Refer to Task Builder > Error Causes Tab for details.)
On Error tab - Specify what AWE should do if this step encounters an error as defined on the Error Causes tab. (Refer to Task Builder > On Error Tab for details.)
Example
<AMFILESYSTEM ACTIVITY="get" MODE="folder" SOURCE="C:\temp" RESULTDATASET="theFolderInfo" FILEPROPERTY="fullname" /> <AMFILESYSTEM ACTIVITY="dataset_to_csv" DESTINATION="c:\temp3\theFolderInfo.csv" RESULTDATASET="theFolderInfo" OVERWRITE="YES" />