option statement is used to set global parameters during the execution of a Transcript task.
option = setting
option statement can be used multiple times within the same task script and always takes immediate effect. It is therefore possible (for example) to import a CSV file delimited with commas and quoted with single quotes, change the options and then export it with semicolon delimiters and double quotes.
The supported options are as follows:
Determines whether to proceed to the next day in a date range or bail out if an error occurs on any given day when processing a range of dates - see notes below.
Specifies the delimiter character between each field in a CSV file. This character will be used when importing and exporting Datasets. The default value is a comma. If a dot character is used, then the
May be set to
May be set to
Specifies the quote character used for quoting fields in a CSV file. This character is taken into consideration when importing and exporting Datasets. When importing a Dataset, any fields that begin and end with this character will have it removed during the import process. When exporting a Dataset, all non-blank fields will be quoted using this character. Note that when specifying a literal quote character, it must be escaped:
Specifies that no quoting is to be performed either when importing or exporting Datasets. A subsequent
Sets the logging level - see notes below
Sets the logging mode - see notes below
May be set to
May be set to
The default value for create mergedcolumn to use if a source column is blank
The default value for create mergedcolumn to use if no match is found for a regular expression in a source column value
option continue = yes|enabled
option continue = no|disabled
When executing a task file repeatedly against each day in a date range, by default Transcript will abort the whole run if a task failure occurs. In cases where this is undesirable, setting the continue option to enabled or yes (both work in exactly the same way) will change the behaviour such that if a task failure occurs then execution will resume with the next day in the range.
When specifying a quote or tab as the separator it is necessary to escape it in order to prevent Transcript from interpreting it as a meaningful character during the parsing of the task script. For example:
option delimiter = \t # Specify a literal TAB characteroption delimiter = \" # Specify a literal quote
Existing service definitions which have keys matching those in the data being processed will not be overwritten with new versions (though new services may be created).
Existing services which have keys matching those in the data being processed will be overwritten.
Existing services which have keys matching those in the data being processed will have their Description and Unit Label fields updated, but no other changes will be made.
option mode = strictoption mode = permissive
Transcript supports two modes of execution for tasks:
strict mode, if an error is encountered at any point in the task, the error will be logged and execution will terminate
permissive mode, many errors that would otherwise have caused the task to fail will be logged, the statement that caused the error will be skipped and execution will continue from the next statement in the task.
Errors that can be handled in
permissive mode are mainly syntax errors or those involving invalid parameters to Transcript statements. There are error conditions that can arise during the execution of a statement will cause the task to fail even in
Transcript generates a considerable amount of logging information during the execution of a task. The
loglevel option can be used to increase or decrease the level of detail written to the logfile. All logging levels must be specified in UPPER CASE. The following levels can be set:
Self-diagnostic messages indicating an internal error detected with Transcript itself
Non-recoverable errors, usually as a result of an Operating System error such as no available memory
A transcript task error (syntax or data related)
An unexpected event or a syntax error that can be recovered from
Informational messages about actions performed during the execution of a transcript task
Detailed logs of actions performed during the execution of a transcript task
Extended debugging information (may cause very large logfiles and a minor reduction in performance)
The order of the logging levels in the table above is significant, in that for any given level, all levels above it in the table are also in effect. Therefore a logging level of
WARN will result in log entries for
INTERNAL level events, as well as warnings.
Regardless of the logging level, some events will always create a logfile entry, for example the success or failure of a transcript task at the end of its execution.
In order to minimise the effect on performance when logging, Transcript opens the logfile when it is first run and then holds it open until the completion of the task being executed. The logfile can be accessed in one of two modes:
After every message, the logfile is flushed to disk
The logfile is not explicitly flushed to disk until the termination of the task file
The default is
SAFE. It is not recommended that this be changed.
The following Transcript task will import a CSV file quoted with double quotes and delimited with commas and then export a copy with semicolons as delimiters and quoted with single quotes:
It also increases the logging level for the import statement
option quote = \"option loglevel = DEBUGXimport usage from Azureoption loglevel = INFOoption separator = ;option quote = 'export azure.Usage as c:\transcript\exported\azure_modified.csv