Source Jitterbit Variables¶
Introduction¶
This page covers Jitterbit variables that are available for activities used as sources, organized by informational variables that you read (Informational), and settings variables that you write (Settings).
Informational¶
jitterbit.source.filename
¶
Data Type¶
String
Description¶
The name of the source file. Holds the leaf part of the locator. For example, if the locator is ftp://ordersrv/orderdrop/po.xml
, the name of the source file is po.xml
. This variable is available only while a transformation using this particular file is executing.
jitterbit.source.filenames
¶
Data Type¶
Array
Description¶
Same as jitterbit.source.locators
but holding only the leaf part of the locators (see jitterbit.source.locator
). This variable is available unless it has been overwritten by another operation in an operation chain.
jitterbit.source.ftp.return_code
¶
Data Type¶
Integer
Description¶
The response status code returned from an FTP source when used in an operation or ReadFile()
script function. If no status code is returned, the reported value is -1
.
jitterbit.source.http.response
¶
Data Type¶
String
Description¶
The response body returned from an HTTP source when used in an operation or ReadFile()
script function. This variable is populated only when the operation or function fails. Available as of Jitterbit Harmony version 8.20.
jitterbit.source.http.status_code
¶
Data Type¶
Integer
Description¶
The response status code returned from an HTTP source when used in an operation or ReadFile()
script function. If no status code is returned, the reported value is -1
.
jitterbit.source.locator
¶
Data Type¶
String
Description¶
The locator used to fetch a file. This can be a URL or a path to a file share, such as ftp://ordersrv/orderdrop/po.xml
. This variable is available only while a transformation using this particular file is executing.
jitterbit.source.locators
¶
Data Type¶
Array
Description¶
An array containing all the locators that will be processed. This variable is available after the source files have been fetched. It is available as long as it has not been overwritten by another operation in an operation chain.
jitterbit.source.size
¶
Data Type¶
Integer
Description¶
Size of the source file in bytes. The size is 0
for database sources.
jitterbit.source.sizes
¶
Data Type¶
Array
Description¶
An array containing all the sizes of the source files that will be processed. This variable is available after the source files have been fetched. It is available as long as it has not been overwritten by another operation in an operation chain.
Settings¶
jitterbit.source.db.character_encoding
¶
Data Type¶
String
Description¶
Specifies the character encoding for ODBC source database character/text columns. If no encoding is specified, Latin-1 (ISO-8859-1) is assumed. For supported encoding, see Supported Character Encodings.
jitterbit.source.db.preserve_char_whitespace
¶
Data Type¶
Boolean
Default Value¶
false
Description¶
Preserves whitespace in char(n)
database source columns if the length of the data is less than n
.
jitterbit.source.db.schema_name_delimiter
¶
Data Type¶
String
Default Value¶
.
Description¶
Character used by the source database to delimit the schema name from the table name, such as Schema.Tab
. The default is a single period (.
), as most databases use a period as the delimiter.
jitterbit.source.db.trim
¶
Data Type¶
Boolean
Default Value¶
false
Description¶
Trim white-space characters from values read from the database.
jitterbit.source.file_limit
¶
Data Type¶
Integer
Description¶
Maximum number of files to process for a file share or FTP source. This limit is applied after the files have been listed and filtered.
jitterbit.source.file_share.file_list_limit
¶
Data Type¶
Integer
Description¶
This option limits the number of files that are listed for a file share. It is applied before the filter. This option is more efficient than jitterbit.source.file_limit
, but it can be used only if all the files in a directory are to be processed. In all other cases, use jitterbit.source.file_limit
for file share sources.
jitterbit.source.ftp.enable_regex_parser
¶
Data Type¶
Boolean
Description¶
If set to true
upstream of reading from an FTP Site Source, files will be retrieved using an alternative FTP parsing flow.
Use the alternative flow if you are missing known files or if the names of files have extra information attached to them after retrieving them from the endpoint.
jitterbit.source.ftp.encode_url
and jitterbit.target.ftp.encode_url
¶
Data Type¶
Boolean
Default Value¶
false
Description¶
Set both variables to true
in a transformation script to use encoding where a filename or folder name contains special characters such as #
, %
, or @. For example, sftp://reposit.mysite.com/storage/file#1.xml
.
jitterbit.source.ftp.transfer_timeout
¶
Data Type¶
Integer
Description¶
Set the transfer time-out in seconds for FTP source transfers. The default transfer time-out for FTP is four hours (14,400 seconds). Set to zero to disable.
jitterbit.source.http.max_redirs
¶
Data Type¶
Integer
Default Value¶
0
Description¶
Maximum number of redirects to follow when using an HTTP source. Set this variable to a negative number to follow any number of redirects. The default is 0 (zero); no redirects are followed.
jitterbit.source.http.response.header.<HeaderName>
¶
(shown in the script editor as jitterbit.target.http.response.header.*
)
Data Type¶
String
Description¶
Set when handling a hosted web service call or an HTTP endpoint. HTTP request headers are not exposed, just the payload. When substituted by the name of an HTTP header for <HeaderName>
, this variable holds the corresponding value of the header.
For example, the variable Get("jitterbit.source.http.response.header.Content-Type")
would hold the MIME type of the body of the request.
Note
If the header name includes a hyphen, you must reference the variable by using either the Set
or Get
functions.
jitterbit.source.http.ssl_cert_id
¶
Data Type¶
String
Description¶
An identifier for a configuration entry in the configuration file jitterbit.conf
for the SSL certificate to use for HTTP sources. Also see Customizations > Client Certificates and Adding Certificates to Keystore for Private Agents.
jitterbit.source.http.transfer_timeout
¶
Data Type¶
Integer
Description¶
Sets the transfer time-out in seconds for HTTP source transfers. The default transfer time-out for HTTP is one hour (3,600 seconds). Set to zero to disable.
jitterbit.source.preserve_char_whitespace
¶
Data Type¶
Boolean
Default Value¶
false
Description¶
Set this to true
to preserve whitespace in source data. The default value is false
, meaning white space will be trimmed from the beginning and end of strings in the source.
jitterbit.source.sftp.ssh_key_id
and jitterbit.target.sftp.ssh_key_id
¶
Data Type¶
String
Default Value¶
""
Description¶
For configuring multiple SSH keys. By default, these are both empty, meaning the configuration in the [SSH]
section of the jitterbit.conf
configuration is used for all SFTP sources and targets with no password defined:
[SSH]
PublicKeyFile='Z:/ssh/rsa2048.pub'
PrivateKeyFile='Z:/ssh/rsa2048'
PrivateKeyPassphrase=secret
Note
When editing the configuration file, note that a line that is commented out with a leading #
must not be left blank, or the next line will be read as a comment even if it does not begin with #
.
If either of these variables is set to a string (such as "RSA"
), then these configuration options will be used for a source or target (depending on which variable is defined):
PublicKeyFileRSA='Z:/ssh/id_rsa.pub'
PrivateKeyFileRSA='Z:/ssh/id_rsa'
PrivateKeyPassphraseRSA=verysecret
This allows the picking of different key sets when using public/private SSH key authentication for different SFTP sources and targets.
jitterbit.source.text.character_encoding
¶
Data Type¶
String
Description¶
Specify the character encoding for text source documents. If no encoding is specified, Latin-1 (ISO-8859-1) is assumed. For supported encoding, see Supported Character Encodings.
jitterbit.source.text.csv_nullable
¶
Data Type¶
Boolean
Description¶
If set to true
, CSV files can contain null data elements. Two consecutive commas in a file will be interpreted as a null.