Navigate to Data Workbench > Queries.
Create a new query or select an existing query.
Next to Schedule, select None.
In the drop-down, select one of the following schedule options.
Review Custom cron... details.
|@daily (midnight)||Run once a day at midnight (00:00 am) in the specified time zone.|
|@hourly (:00)||Run every hour at 00 minutes.|
Custom cron... Details
0 * * * *
Run once an hour
0 0 * * *
Run once a day at midnight
0 0 1 * *
Run once a month at midnight on the morning of the first day of the month
Create a job that has no scheduled run time.
* * * * *
- - - - -
| | | | |
| | | | +----- day of week (0 - 6) (Sunday=0)
| | | +---------- month (1 - 12)
| | +--------------- day of month (1 - 31)
| +-------------------- hour (0 - 23)
+------------------------- min (0 - 59)
The following named entries can be used:
Day of Week: sun, mon, tue, wed, thu, fri, sat
Month: jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec
A single space is required between each field. The values for each field can be composed of:
|Field Value||Example||Example Description|
a single value, within the limits displayed above for each field.
‘*’ to indicate no restriction based on the field.
‘0 0 1 * *’
|configures the schedule to run at midnight (00:00) on the first day of each month.|
|a range |
‘2-5’, indicating the range of accepted values for the field.
‘0 0 1-10 * *’
|configures the schedule to run at midnight (00:00) on the first 10 days of each month.|
|a list of comma-separated values |
‘2,3,4,5’, indicating the list of accepted values for the field.
0 0 1,11,21 * *’
|configures the schedule to run at midnight (00:00) every 1st, 11th, and 21st day of each month.|
|a periodicity indicator |
‘*/5’ to express how often based on the field’s valid range of values a schedule is allowed to run.
‘30 */2 1 * *’
|configures the schedule to run on the 1st of every month, every 2 hours starting at 00:30. |
‘0 0 */5 * *’ configures the schedule to run at midnight (00:00) every 5 days starting on the 5th of each month.
|a comma-separated list of any of the above except the |
‘*’ wildcard is also supported
‘0 0 5,*/10,25 * *’
|configures the schedule to run at midnight (00:00) every 5th, 10th, 20th, and 25th day of each month.|
(Optional) If you enabled the Delay execution, you can delay the start time of a query.
Execute the Query
Save the query with a name and run, or just run the query. Upon successful completion of the query, the query result is automatically imported to the specified container destination.
Export to SFTP Server Using Workflow
You can export the result of a job to SFTP by using td>: operator of workflow. If you add `result_connection` and `result_settings` options, the task exports the result of the job of the run query.
Learn more at Using Workflows to Export Data with the TD Toolbelt.
Treat the user directory as the root directory
true or false
Files are stored at this path.
Renames the file on the remote SFTP server from “.xxx.tmp” to “.xxx” after all the data is transferred. Some MA tools try to import data when a file with a specific name exists on the SFTP server. The temp name option is useful for such cases.
true or false
Format of the exported files. You can choose CSV or TSV.
Compression format of the exported file.
If true, write the header line with column name at the first line.
true or false
- default(, for CSV, \t for TSV)
- Any single-byte character
Policy for quote
MINIMAL for CSV,
NONE for TSV
Expression of NULL values
empty string for CSV
\N for TSV
The maximum file size (in bytes) of local temp file. When the temp file reaches the threshold, the file is flushed to a remote file.
If you encounter an error like `channel is broken`, reducing the value of this option might resolve the error.
*If quote_policy is NONE, the `quote` option is ignored and \ is used as the default `escape` option ← need check. The quote_policy option is used to determine the field type to quote as follows.