Spectre Flow Input Code Blocks
Spectre Flow input code blocks define data sources in a flow script. Each code block has multiple tags that allow you to further define the input.
The cBase Input code block loads data from a cBase. For information about the corresponding Spectre Flow Editor object, see Spectre Flow cBase Input Object. The cBase Input code block has the following structure:
cbase-input "<name>" {
file "<filename>"
}
cBase Input Tags
Specifies the source file or files. If multiple files are specified, the file contents are concatenated as if the Concat code block were used. Either file or file-list must be specified.
Specifies a file containing the list of cBase files to be parsed. You may also specify the name of a text input or directory input code block that returns a list of cBase files. Either file or file-list must be specified.
Specifies a filter expression to apply to the cBase. Optional.
Creates a string column that contains the filename of the file from which each row was loaded, and specifies a name for the column. Optional.
Creates a string column that contains the modified time of the file from which each row was loaded, and specifies a name for the column. Optional.
Specifies how many rows to read before stopping. Optional.
Describes a column in the input. For a list of column tags, see Spectre Flow Column Tags.
If present, any columns found in the input that aren't specified with the column tag are included, and their properties are automatically determined. Optional.
Indicates that a column should not be parsed. This is only necessary if the include-other-columns tag is present or if there are no column tags. Optional.
If set, the string you provide is added to the beginning of the name of each output column. Optional.
The cPlan Input code block loads data from a cPlan. For information about the corresponding Spectre Flow Editor object, see Spectre Flow cPlan Input Object. The cPlan Input code block has the following structure:
cplan-input "<name>" {
file "<filename>"
}
cPlan Input Tags
Specifies the source file.
Sets parameters in the target cPlan script. Multiple parameters can be specified. Optional.
Specifies a filter expression to apply to the cPlan. The filter is applied at the detail level, and parameters can be specified for the filter. Optional.
Specifies how many rows to read before stopping. Optional.
If set, the string you provide is added to the beginning of the name of each output column. Optional.
Describes one or more dimension columns to include in the input. Optional. For a list of column tags, see Spectre Flow Column Tags.
Describes the one or more summary columns to include in the input. Optional. For a list of column tags, see Spectre Flow Column Tags.
The Datagen Input code block outputs a table of randomly generated data. For information about the corresponding Spectre Flow Editor object, see Spectre Flow Datagen Input Object. The Datagen Input code block has the following structure:
datagen-input "<name>" {
seed <seed>
count <count>
column
}
Datagen Input Tags
Sets a numerical seed for the generators. This allows generators to generate the same data every time (as long as the seed stays the same). Optional.
Specifies how many rows of data are generated. Required.
Defines settings for columns generated by this code block. Optional. For a list of column tags, see Spectre Flow Column Tags. Has the following unique sub tag:
-
<datagen-generator>—Sets the type of generator. A list of generator tags is below.
Datagen Generator Tags
Generates whole numbers.
-
seed—Sets a seed for this generator. Optional.
-
min—Sets the minimum value allowed. The default is 0.
-
max—Sets the maximum value allowed. The default is 100.
Generates fixed100 numbers.
- seed—Sets a seed for this generator. Optional.
-
min—Sets the minimum value allowed. The default is 0.
-
max—Sets the maximum value allowed. The default is 100.
Generates numbers with decimal places.
- seed—Sets a seed for this generator. Optional.
-
min—Sets the minimum value allowed. The default is 0.
-
max—Sets the maximum value allowed. The default is 100.
Generates date values.
- seed—Sets a seed for this generator. Optional.
-
min—Sets the minimum value allowed. The default is 2000/01/01.
-
max—Sets the maximum value allowed. The default is 2020/12/31.
Generates date and time values.
- seed—Sets a seed for this generator. Optional.
- min—Sets the minimum value allowed. The default is 2000/01/01 00:00:00.
-
max—Sets the maximum value allowed. The default is 2020/12/31 11:59:59.
Generates a string from a listed set of values.
- seed—Sets a seed for this generator. Optional.
- value—Sets a possible value to generate. This can occur multiple times. At least one value is required.
Generates a series of words.
- seed—Sets a seed for this generator. Optional.
- min-length—Sets the minimum length of generated words. The default is 3.
- max-length—Sets the maximum length of generated words. The default is 10.
For each row in the output, a number is generated from a sequence. If the number of the rows in the output is greater than the number entered as the end value, the sequence starts over from the start value.
- start—Sets the start value of the sequence. The default is 3.
- end—Sets the end value of the sequence. The default is 9,223,372,036,854,775,807.
Generates random city names.
-
seed—Sets a seed for this generator. Optional.
Generates random state abbreviations.
-
seed—Sets a seed for this generator. Optional.
Generates random first names.
-
seed—Sets a seed for this generator. Optional.
Generates random last names.
-
seed—Sets a seed for this generator. Optional.
Generates random full names.
-
seed—Sets a seed for this generator. Optional.
The Directory Input code block outputs a table of information about files in a project. For information about the corresponding Spectre Flow Editor object, see Spectre Flow Directory Input Object. The Directory Input code block has the following structure:
directory-input "<name>" {
directory "<path-to-directory>"...
include-files "<file-pattern>"...
recursive
file-type "<any|file|directory>"
column "<column-name>"
include-other-columns
drop-column "<column-name>"
prefix "<prefix>"
}
NOTE:
-
This returns files and/or directories accessible from the current project, using paths that can reach them in that project. As such, results reached through an alias include the path to the alias directory.
-
If the recursive tag is specified, a given file might be reached through two different aliases. If so, the file appears twice in the output, with the two different paths by which it can be reached.
-
If multiple search directories are specified, it's possible that one of them is a descendant of another. In that case, if the recursive tag is present, this will not recur over the descendant twice. A given path only gets one row in the output.
Directory Input Tags
Specifies the directory or directories to search. Wildcard characters are supported.
Specifies a filename pattern or patterns that determine which files to include. Wildcard characters are supported. If not present, all files are included. Optional.
If present, files in subdirectories are included in the output. Optional.
Determines whether the output includes files, directories, or both. Values allowed are file, directory, and any. The default value is any. Optional.
Describes a column in the input. For a list of column tags, see Spectre Flow Column Tags. Has the following unique sub-tag:
-
from-column—Specifies a source column from which the column is created. Optional. The from-column tag can have the following values:
-
Path—The full path to the file in the current project. This value is formatted with absolute pathing and always begins with a forward slash (/).
-
File Type—Corresponds to the file type. This will always be either File or Directory.
-
Filename—The file name. This corresponds to everything after the last forward slash (/) in the file path.
-
Extension—For a file, this corresponds to everything after the last period (.) of the filename, if a period is present in the file name. If there is no period, this returns an empty string. For directories, this value always returns an empty string.
-
File Size—For a file, this returns the file size in bytes. For a directory, this returns an empty string.
-
Modified Time—A datetime value that represents the last modified time for the file or directory.
-
If present, any columns found in the input that aren't specified with the column tag are included, and their properties are automatically determined. Optional. Has the following sub-tags that apply to all columns that are included by this tag:
-
type—Sets the data type of the column. Available values are: string, integer, double, fixed100, date, datetime, period, and boolean.
-
suggested-dimension—Manually sets whether or not a column is considered a diveable dimension by default. If true, the column is promoted to a diveable dimension. If false, the column is treated as a dimension that is not diveable. When set to false, the new dimension does not appear in the ProDiver console (which requires DimCount processing), but it can still be promoted to a dimension for diving. A suggested dimension is equivalent to a dynamic dimension in a classic model.
Indicates that a column should not be parsed. This is only necessary if the include-other-columns tag is present or if there are no column tags. Optional.
If set, the string you provide is added to the beginning of the name of each output column. Optional.
The Dive Input code block loads data from the output of a Spectre Dive script. For information about the corresponding Spectre Flow Editor object, see Spectre Flow Dive Input Object. The Dive Input code block has the following structure:
dive-input "<name>" {
file "<file>"
pass-parameter "<param-name>"
limit-rows <row-number>
column "<column-name>"
include-other-columns
drop-column "<column-name>"
prefix "<prefix>"
}
Dive Input Tags
Specifies the source file.
Sets parameters in the target dive script. Multiple parameters can be specified. Optional.
A default value for the property. If the all-values tag is present, multiple value tags can be specified.
If present, multiple value tags can be present. Optional.
Specifies how many rows to read before stopping. Optional.
Describes a column in the input. For a list of column tags, see Spectre Flow Column Tags.
If present, any columns found in the input that aren't specified with the column tag are included, and their properties are automatically determined. Optional. Has the following sub-tags that apply to all columns that are included by this tag:
-
type—Sets the data type of the column. Available values are: string, integer, double, fixed100, date, datetime, period, and boolean.
-
suggested-dimension—Manually sets whether or not a column is considered a diveable dimension by default. If true, the column is promoted to a diveable dimension. If false, the column is treated as a dimension that is not diveable. When set to false, the new dimension does not appear in the ProDiver console (which requires DimCount processing), but it can still be promoted to a dimension for diving. A suggested dimension is equivalent to a dynamic dimension in a classic model.
Indicates that a column should not be parsed. This is only necessary if the include-other-columns tag is present or if there are no column tags. Optional.
If set, the string you provide is added to the beginning of the name of each output column. Optional.
The Excel Input code block loads data from an xlsx file. For information about the corresponding Spectre Flow Editor object, see Spectre Flow Excel Input Object. The Excel Input code block has the following structure:
excel-input "<name>" {
file "<filename>"
password "<password>"
sheet "<sheet>"
range "<range>"
start-row <start-row>
no-headers
no-trim
column "<column-name>"
include-other-columns
drop-column "<column-name>"
prefix "<prefix>"
<row-count>
}
Excel Input Tags
Specifies the source file.
Specifies a password if the Excel file is password-protected. It is not recommended to use password-protected Excel files as data sources. Optional.
Specifies either the name of a worksheet in the file or the numerical index of a worksheet (starting at 1). Optional.
Specifies a range of cells in the input. Any cells outside of the range are ignored. The format for the range is the top-left cell (column letter and row number), followed by a colon, followed by the bottom-right cell (column letter and row number). For example, A1:D25 returns the first 25 rows from the first column (column A) through the fourth column (column D). Optional.
Defines the row number from which to begin reading data. If no value is specified, Spectre attempts to automatically determine which row represents the start.
If present, every file must have its columns specified in the text-input code block, in the same order. If absent, the first line of each file defines the names of its columns. Optional.
If present, white space is preserved in parsed values. Optional.
Describes a column in the input. For a list of column tags, see Spectre Flow Column Tags. Has the following unique sub tags:
-
from-column—Specifies a source column from which the column is created. Optional.
-
repeat-if-blank—If present, when a blank cell is encountered in a column, Spectre fills in that blank cell with the last non-blank value from that column. Optional.
If present, any columns found in the input that aren't specified with the column tag are included, and their properties are automatically determined. Optional. Has the following sub-tags that apply to all columns that are included by this tag:
-
type—Sets the data type of the column. Available values are: string, integer, double, fixed100, date, datetime, period, and boolean.
-
suggested-dimension—Manually sets whether or not a column is considered a diveable dimension by default. If true, the column is promoted to a diveable dimension. If false, the column is treated as a dimension that is not diveable. When set to false, the new dimension does not appear in the ProDiver console (which requires DimCount processing), but it can still be promoted to a dimension for diving. A suggested dimension is equivalent to a dynamic dimension in a classic model.
Indicates that a column should not be parsed. This is only necessary if the include-other-columns tag is present or if there are no column tags. Optional.
If set, the string you provide is added to the beginning of the name of each output column. Optional.
Specifies how many rows to read before stopping. Optional.
If true, similar values in the column cause a warning in the run log. If false or not present, these warnings are suppressed. Optional.
If true, dates in the column that are very far in the past or very far in the future cause a warning in the run log. If false or not present, these warnings are suppressed. Optional.
The Flow Input code block loads data from the output of another flow script. The source script must have a single flow-output code block. For information about the corresponding Spectre Flow Editor object, see Spectre Flow Flow Input Object. The Flow Input code block has the following structure:
flow-input "<name>" {
file "<filename>"
pass-parameter "<param-name>" {
value "<values>"
all-values
}
limit-rows <row-count>
column "<column-name>"
include-other-columns
drop-column "<column-name>"
prefix "<prefix>"
}
Flow Input Tags
Specifies the source file.
Sets parameters in the target flow script. Multiple parameters can be specified. Optional.
A default value for the property. If the all-values tag is present, multiple value tags can be specified.
If present, multiple value tags can be present. Optional.
Specifies how many rows to read before stopping. Optional.
Describes a column in the input. For a list of column tags, see Spectre Flow Column Tags. Has the following unique sub tag:
-
from-column—Specifies a source column from which the column is created. Optional.
If present, any columns found in the input that aren't specified with the column tag are included, and their properties are automatically determined. Optional. Has the following sub-tags that apply to all columns that are included by this tag:
-
type—Sets the data type of the column. Available values are: string, integer, double, fixed100, date, datetime, period, and boolean.
-
suggested-dimension—Manually sets whether or not a column is considered a diveable dimension by default. If true, the column is promoted to a diveable dimension. If false, the column is treated as a dimension that is not diveable. When set to false, the new dimension does not appear in the ProDiver console (which requires DimCount processing), but it can still be promoted to a dimension for diving. A suggested dimension is equivalent to a dynamic dimension in a classic model.
Indicates that a column should not be parsed. This is only necessary if the include-other-columns tag is present or if there are no column tags. Optional.
If set, the string you provide is added to the beginning of the name of each output column. Optional.
The JSON Input code block loads data from a JSON file. For information about the corresponding Spectre Flow Editor object, see Spectre Flow JSON Input Object. The JSON Input code block has the following structure:
json-input "<name>" {
file "<filename>"
parent "<parent>"
id-column
drop-id
no-trim
column "<column-name>"
include-other-columns
single-row-object <true | false>
drop-key "<key>"
prefix "<prefix>"
<row-count>
}
JSON Input Tags
Specifies the source file.
If a parent exists, specifies the JSON path identifying where the parent value can be found in the document. The parent is the object that contains the values that will be mapped to rows. The parent value must be an object or an array. If parent is absent, the root of the JSON document is used as the parent. Optional.
Defines a column where each row is the name of a field in a JSON object. Optional.
For example, given the following input:
{
"CA": {
"name": "California",
"population": 39237836
},
"TX": {
"name": "Texas",
"population": 29527941
},
"FL": {
"name": "Florida",
"population": 21781128
}
}
In this example, you would set the id-column to "Abbrev".
The Abbrev column has the values CA, TX, and FL.
NOTE: When using the include-other-columns tag, the default behavior for object parent values is to create a column named ID for the field names. You can use the drop-id tag to avoid creating that column.
When the parent tag is an object and the include-other-columns tag is present, this prevents the creation of an ID column for the field names. Optional.
If present, white space is preserved in parsed values. Optional.
Describes a column in the input. For a list of column tags, see Spectre Flow Column Tags. Has the following unique sub tag:
-
from-key—Specifies a source key from which the column is created. Optional.
If present, any columns found in the input that aren't specified with the column tag are included, and their properties are automatically determined. Optional. Has the following sub-tags that apply to all columns that are included by this tag:
-
type—Sets the data type of the column. Available values are: string, integer, double, fixed100, date, datetime, period, and boolean.
-
suggested-dimension—Manually sets whether or not a column is considered a diveable dimension by default. If true, the column is promoted to a diveable dimension. If false, the column is treated as a dimension that is not diveable. When set to false, the new dimension does not appear in the ProDiver console (which requires DimCount processing), but it can still be promoted to a dimension for diving. A suggested dimension is equivalent to a dynamic dimension in a classic model.
When true, indicates that the input JSON file is formatted with a series of single line objects, as opposed to an array of objects. For more information, see Working with JSON File Format in Spectre .
Indicates that a column should not be parsed. This is only necessary if the include-other-columns tag is present or if there are no column tags. Optional. Has the following sub-tags that apply to all columns that are included by this tag:
-
type—Sets the data type of the column. Available values are: string, integer, double, fixed100, date, datetime, period, and boolean.
-
suggested-dimension—Manually sets whether or not a column is considered a diveable dimension by default. If true, the column is promoted to a diveable dimension. If false, the column is treated as a dimension that is not diveable. When set to false, the new dimension does not appear in the ProDiver console (which requires DimCount processing), but it can still be promoted to a dimension for diving. A suggested dimension is equivalent to a dynamic dimension in a classic model.
If set, the string you provide is added to the beginning of the name of each output column. Optional.
Specifies how many rows to read before stopping. Optional.
If true, similar values in the column cause a warning in the run log. If false or not present, these warnings are suppressed. Optional.
If true, dates in the column that are very far in the past or very far in the future cause a warning in the run log. If false or not present, these warnings are suppressed. Optional.
The List Input code block creates a data flow containing manually entered information. For information about the corresponding Spectre Flow Editor object, see Spectre Flow List Input Object. The List Input code block has the following structure:
list-input "<name>" {
column "<column-name>"
row "<value>"...
}
List Input Tags
Defines a column of data. For a list of column tags, see Spectre Flow Column Tags.
Defines one row of data. Each value in a row corresponds to a column in the same order that columns are specified in column tags. Every row must have the same number of values.
If true, similar values in the column cause a warning in the run log. If false or not present, these warnings are suppressed. Optional.
If true, dates in the column that are very far in the past or very far in the future cause a warning in the run log. If false or not present, these warnings are suppressed. Optional.
The ODBC Input code block loads data from an ODBC connection. For information about the corresponding Spectre Flow Editor object, see Spectre Flow ODBC Input Object. For more information about ODBC, see DI-ODBC Overview. The ODBC Input code block has the following structure:
odbc-input "<name>" {
dsn "<dsn>"
connect-string "<connect-string>"
connect-file "<connect-file>"
user "<user>"
password "<password>"
query "<query>" {
bind <bind-value>
}
query-file "<query-file>"
encoding "<encoding>"
no-trim
column "<column-name>"
include-other-columns
drop-column "<column-name>"
prefix "<prefix>"
limit-rows <row-count>
stale-after <number-of-seconds>
similar-values-warning
date-range-warning
}
ODBC Input Tags
Specifies the DSN to use.
Specifies a string with connection information for the ODBC data source. Either a connect-string or a connect-file is required.
Specifies a file containing connection information for the ODBC data source. Either a connect-string or a connect-file is required.
Specifies the SQL query to run on the ODBC data source. Either a query or a query-file is required.
-
bind—Specifies parameters for safe insertion into the query.
Specifies a file containing a SQL query to run on the ODBC data source. Either a query or a query-file is required.
Specifies the standard you want to use to encode the input files. The default value is utf8. Optional.
If present, white space is preserved in parsed values. Optional.
Describes a column in the input. For a list of column tags, see Spectre Flow Column Tags. Has the following unique sub tag:
-
from-column—Specifies a source column from which the column is created. Optional.
If present, any columns found in the input that aren't specified with the column tag are included, and their properties are automatically determined. Optional. Has the following sub-tags that apply to all columns that are included by this tag:
-
type—Sets the data type of the column. Available values are: string, integer, double, fixed100, date, datetime, period, and boolean.
-
suggested-dimension—Manually sets whether or not a column is considered a diveable dimension by default. If true, the column is promoted to a diveable dimension. If false, the column is treated as a dimension that is not diveable. When set to false, the new dimension does not appear in the ProDiver console (which requires DimCount processing), but it can still be promoted to a dimension for diving. A suggested dimension is equivalent to a dynamic dimension in a classic model.
Indicates that a column should not be parsed. This is only necessary if the include-other-columns tag is present or if there are no column tags. Optional.
NOTE: DI best practice is to avoid the drop-column tag by not querying for columns that are not going to be used.
If set, the string you provide is added to the beginning of the name of each output column. Optional.
Specifies how many rows to read before stopping. Optional.
Enables caching of data coming out of the code block. The number of seconds set for this tag determine how much time goes by until the cache is reset.
If true, similar values in the column cause a warning in the run log. If false or not present, these warnings are suppressed. Optional.
If true, dates in the column that are very far in the past or very far in the future cause a warning in the run log. If false or not present, these warnings are suppressed. Optional.
The Sqlite Input code block loads data from a Sqlite database file. The Sqlite Input code block has the following structure:
sqlite-input "<name>" {
file "<sqlite DB file>"
query "<query>" {
bind <bind-value>
}
query-file "<query-file>"
encoding "<encoding>"
no-trim
column "<column-name>"
include-other-columns
drop-column "<column-name>"
prefix "<prefix>"
limit-rows <row-count>
stale-after <number-of-seconds>
similar-values-warning
date-range-warning
}
Sqlite Input Tags
Specifies the source database file.
Specifies the SQL query to run on the ODBC data source. Either a query or a query-file is required. Has the following sub-tag:
-
bind—Specifies parameters for safe insertion into the query.
Specifies a file containing a SQL query to run on the ODBC data source. Either a query or a query-file is required.
Specifies the standard you want to use to encode the input files. The default value is utf8. Optional.
If present, white space is preserved in parsed values. Optional.
Describes a column in the input. For a list of column tags, see Spectre Flow Column Tags. Has the following unique sub tag:
-
from-column—Specifies a source column from which the column is created. Optional.
If present, any columns found in the input that aren't specified with the column tag are included, and their properties are automatically determined. Optional. Has the following sub-tags that apply to all columns that are included by this tag:
-
type—Sets the data type of the column. Available values are: string, integer, double, fixed100, date, datetime, period, and boolean.
-
suggested-dimension—Manually sets whether or not a column is considered a diveable dimension by default. If true, the column is promoted to a diveable dimension. If false, the column is treated as a dimension that is not diveable. When set to false, the new dimension does not appear in the ProDiver console (which requires DimCount processing), but it can still be promoted to a dimension for diving. A suggested dimension is equivalent to a dynamic dimension in a classic model.
Indicates that a column should not be parsed. This is only necessary if the include-other-columns tag is present or if there are no column tags. Optional.
NOTE: DI best practice is to avoid the drop-column tag by not querying for columns that are not going to be used.
If set, the string you provide is added to the beginning of the name of each output column. Optional.
Specifies how many rows to read before stopping. Optional.
Enables caching of data coming out of the code block. The number of seconds set for this tag determine how much time goes by until the cache is reset.
If true, similar values in the column cause a warning in the run log. If false or not present, these warnings are suppressed. Optional.
If true, dates in the column that are very far in the past or very far in the future cause a warning in the run log. If false or not present, these warnings are suppressed. Optional.
The Text Input code block loads data from a text file or list of text files. For information about the corresponding Spectre Flow Editor object, see Spectre Flow Text Input Object. The Text Input code block has the following structure:
text-input "<name>" {
file "<filename>"
}
or
text-input "name" {
file-list "<file-list>"
}
Text Input Tags
Specifies the source file or files. If multiple files are specified, the file contents are concatenated as if the Concat code block were used. Either file or file-list must be specified.
Specifies a file containing the list of text files to be parsed. You may also specify the name of another text input or directory input code block. Either file or file-list must be specified.
Specifies the standard you want to use to encode the input files. The default value is utf8. Optional.
If present, every file must have its columns specified in the text-input code block. If this tag is absent, the first line of each file defines the names of its columns. Optional.
Specifies the delimiter character, either as a single character literal or by name as tab or comma. The default value is tab. Optional.
If present, double quotes are preserved in parsed values. Optional.
If present, white space is preserved in parsed values. Optional.
Specifies a dictionary file to describe the format of the input values. Optional.
Describes a column in the input. For a list of column tags, see Spectre Flow Column Tags. Has the following unique sub tag:
-
from-column—Specifies a source column from which the column is created. Optional.
If present, any columns found in the input that aren't specified with the column tag are included, and their properties are automatically determined. Optional. Has the following sub-tags that apply to all columns that are included by this tag:
-
type—Sets the data type of the column. Available values are: string, integer, double, fixed100, date, datetime, period, and boolean.
-
suggested-dimension—Manually sets whether or not a column is considered a diveable dimension by default. If true, the column is promoted to a diveable dimension. If false, the column is treated as a dimension that is not diveable. When set to false, the new dimension does not appear in the ProDiver console (which requires DimCount processing), but it can still be promoted to a dimension for diving. A suggested dimension is equivalent to a dynamic dimension in a classic model.
Indicates that a column should not be parsed. This is only necessary if the include-other-columns tag is present or if there are no column tags. Optional.
Creates a new string column that contains the filename of the file from which each row was loaded and specifies a name for the column. Optional.
Creates a new string column that contains the modified time of the file from which each row was loaded and specifies a name for the column. Optional.
If set, the string you provide is added to the beginning of the name of each output column. Optional.
Specifies how many rows to read before stopping. Optional.
If true, similar values in the column cause a warning in the run log. If false or not present, these warnings are suppressed. Optional.
If true, dates in the column that are very far in the past or very far in the future cause a warning in the run log. If false or not present, these warnings are suppressed. Optional.
The Tunnel Input code block loads data from the output of an Integrator tunnel script. For information about the corresponding Spectre Flow Editor object, see Spectre Flow Tunnel Input Object. The Tunnel Input code block has the following structure:
tunnel-input "<name>" {
file "<filename>"
pass-parameter "<param-name>"
limit-rows <row-count>
column "<column-name>"
include-other-columns
drop-column "<column-name>"
prefix "<prefix>"
stale-after <number-of-seconds>
}
Tunnel Input Tags
Specifies the source file.
Sets parameters in the target tunnel script. Multiple parameters can be specified. Optional.
Specifies how many rows to read before stopping. Optional.
Describes a column in the input. For a list of column tags, see Spectre Flow Column Tags. Has the following unique sub tag:
-
from-column—Specifies a source column from which the column is created. Optional.
If present, any columns found in the input that aren't specified with the column tag are included, and their properties are automatically determined. Optional. Has the following sub-tags that apply to all columns that are included by this tag:
-
type—Sets the data type of the column. Available values are: string, integer, double, fixed100, date, datetime, period, and boolean.
-
suggested-dimension—Manually sets whether or not a column is considered a diveable dimension by default. If true, the column is promoted to a diveable dimension. If false, the column is treated as a dimension that is not diveable. When set to false, the new dimension does not appear in the ProDiver console (which requires DimCount processing), but it can still be promoted to a dimension for diving. A suggested dimension is equivalent to a dynamic dimension in a classic model.
Indicates that a column should not be parsed. This is only necessary if the include-other-columns tag is present or if there are no column tags. Optional.
If set, the string you provide is added to the beginning of the name of each output column. Optional.
Enables caching of data coming out of the code block. The number of seconds set for this tag determine how much time goes by until the cache is reset.