|
Activity |
exportToCsv |
|---|---|
|
Description |
Extract data from a DbStore into a CSV file |
Input :
|
PropertyName |
Rule of use (if revelant) |
Type |
Required |
Default Value |
Description |
|---|---|---|---|---|---|
|
connectionName |
|
STRING |
YES |
|
name of the source connection (see DbStore) |
|
QueryFileToken |
If QueryFileToken is filled in, the content of the file specified will be used instead of Query |
STRING |
YES |
|
Filetoken containing the query to execute |
|
Query |
STRING |
|
SQL Query to execute |
||
|
Params |
|
PARAMETERS ARRAY |
NO |
|
Query parameters |
|
CommandTimeout |
|
INT |
NO |
|
Execution timeout of the SQL query in the database |
|
Separator |
|
CHAR |
NO |
';' |
CSV output separator |
|
OutputFileStoreName |
|
STRING |
YES |
|
Output fileStore name |
|
OutputFileName |
|
STRING |
YES |
|
Name of the output file (.csv extension will be added automatically) |
|
OutputFileEncoding |
|
STRING |
NO |
|
Default is UTF-8 (See here https://learn.microsoft.com/en-us/dotnet/api/system.text.encoding?view=net-9.0 for possible values) |
|
OutputFileCulture |
|
STRING |
NO |
|
Default is Invariant Culture (See https://learn.microsoft.com/en-us/dotnet/api/system.globalization.cultureinfo.name?view=net-9.0#system-globalization-cultureinfo-name for possible values) |
|
OutputFileDateTimeCulture WORKERS 1.12.1+ |
|
STRING |
NO |
|
All .NET date and time objects are serialized to their text representation in the CSV using their Defaults to null, which usually means https://learn.microsoft.com/en-us/dotnet/fundamentals/runtime-libraries/system-globalization-cultureinfo-invariantculture |
|
OutputFileDateTimeFormats WORKERS 2.0.0+ |
|
OBJECT (DICT) |
NO |
|
All .NET date and time objects are serialized to their text representation in the CSV using their For defaults, see below. |
|
OutputFileDateTimeFormats.DateTimeFormat |
|
STRING |
NO |
|
For https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-8.0 objects, this string is used as the format parameter of their |
|
OutputFileDateTimeFormats.DateTimeOffsetFormat |
|
STRING |
NO |
|
For https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset?view=net-8.0 objects, this string is used as the format parameter of their |
|
OutputFileDateTimeFormats.DateOnlyFormat |
|
STRING |
NO |
|
For https://learn.microsoft.com/en-us/dotnet/api/system.dateonly?view=net-8.0 objects, this string is used as the format parameter of their |
|
OutputFileDateTimeFormats.TimeOnlyFormat |
|
STRING |
NO |
|
For https://learn.microsoft.com/en-us/dotnet/api/system.timeonly?view=net-8.0 objects, this string is used as the format parameter of their |
|
OutputFileDateTimeFormats.TimeSpanFormat |
|
STRING |
NO |
|
For https://learn.microsoft.com/en-us/dotnet/api/system.timespan?view=net-8.0 objects, this string is used as the format parameter of their |
Parameters
|
PropertyName |
Type |
Required |
Default Value |
Description |
|---|---|---|---|---|
|
Name |
STRING |
YES |
|
name of the parameter |
|
Value |
STRING |
NO |
|
value of the parameter |
Output
CSV file token
Example1: Export Simple query in CSV
Input
{
"connectionName": "dbStore1",
"query":"SELECT name, role FROM employees"
"outputFileStoreName": "ftp1",
"outputFileName": "employees",
"outputFileDateTimeCulture": "fr-BE",
"outputFileDateTimeFormats": {
"DateTimeFormat": null,
"DateTimeOffsetFormat": "dddd, MMM dd yyyy HH:mm:ss zzz"
}
}
Output
ftp://ftp1/employees.csv
File content
"name";"role"
"bob";"sales"
"frank";"operations"
"billie";"board"