Overview
Turn the results of your SQL SELECT statement into a CSV file. Extract your Microsoft SQL Server data into files for easier delivery to clients and partners.
Variables
|
Name |
Reference |
Type |
Required |
Default |
Options |
Description |
|---|---|---|---|---|---|---|
|
Host |
MSSQL_HOST |
Alphanumeric |
✅ |
None |
- |
The domain or the IP address of the database you want to connect to. |
|
Port |
MSSQL_PORT |
Integer |
✅ |
1433 |
- |
Number for the database port to connect to. Defaults to 1433. |
|
Username |
MSSQL_USERNAME |
Alphanumeric |
✅ |
None |
- |
Name of the user to connect to the database with. |
|
Password |
MSSQL_PASSWORD |
Password |
➖ |
None |
- |
Password associated to the provided username. |
|
Database |
MSSQL_DATABASE |
Alphanumeric |
✅ |
None |
- |
Name of the database in the Microsoft SQL Server to connect to. |
|
Extra URL Parameters |
MSSQL_URL_PARAMETERS |
Alphanumeric |
➖ |
None |
- |
Extra parameters that will be placed at the end of the connection string, after the "?". Must be separated by "&" |
|
Query |
MSSQL_QUERY |
Alphanumeric |
✅ |
None |
- |
A SELECT statement that returns data. Formatting is ignored. |
|
Workflows Folder Name |
MSSQL_DESTINATION_FOLDER_NAME |
Alphanumeric |
➖ |
None |
- |
The folder structure that you want your CSV to be created in. If left blank, the file will be created in the home directory. |
|
Workflows File Name |
MSSQL_DESTINATION_FILE_NAME |
Alphanumeric |
✅ |
output.csv |
- |
The file name that you want your generated CSV to have. |
|
Include Column Names as Header? |
MSSQL_FILE_HEADER |
Boolean |
✅ |
TRUE |
- |
If checked, your CSV file will include a header row with column names. |
YAML
Below is the YAML template
source:
template: Microsoft SQL Server - Download Query Results to Workflows
inputs:
MSSQL_HOST:
MSSQL_PORT: '1433'
MSSQL_USERNAME:
MSSQL_PASSWORD:
MSSQL_DATABASE:
MSSQL_URL_PARAMETERS:
MSSQL_QUERY:
MSSQL_DESTINATION_FOLDER_NAME:
MSSQL_DESTINATION_FILE_NAME: output.csv
MSSQL_FILE_HEADER: 'TRUE'
type: TEMPLATE
guardrails:
retry_count: 1
retry_wait: 0h0m0s
runtime_cutoff: 1h0m0s
exclude_exit_code_ranges:
- 10
- 11
- 14
- 102
- 103
- 104
- 105