Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

On this Page

Table of Contents
maxLevel2
excludeOlder Versions|Additional Resources|Related Links|Related Information

Snap type:

Read


Description:

This Snap allows you to export data from a Teradata database by providing a table name and configuring the connection. The Snap writes the exported data to the specified file and provides the console output and status code on the output view for any downstream Snap checking for successful execution.

Queries produced by the Snap have the format:

Code Block
SELECT TOP [limit] * FROM [table] WHERE [where clause] ORDER BY [ordering]


Note
You will need the Teradata Tools & Utilities (TTU) to have access to the Teradata FastExport component.
  • Expected downstream Snaps: A Snap monitoring the exit code to check result status.
  • Expected input: None.
  • Expected output: A single document containing the console output and return status from the external Teradata application.


Prerequisites:

None


Support and limitations:

Works in Ultra Task Pipelines.

Account: 

This Snap uses account references created on the Accounts page of SnapLogic Manager to handle access to this endpoint. See Configuring Teradata Database Accounts for information on setting up this type of account.


Views:


InputThis Snap has at most one document input view. Anything that is immediately substituted by the Snap itself will work, but anything that is used as a substitution in a query will fail.
OutputThis Snap has at most one document output view. FASTLOAD, Binary, and Unformat are all binary and support non-textual fields. (INT, DATE, etc.). Text is fixed-width text, but explicitly only supports text fields.
ErrorThis Snap has at most one document error view and produces zero or more documents in the view.


Settings

Label


Required. The name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline.

Schema name



The database schema name. In case it is not defined, then the suggestion for the table name will retrieve all tables names of all schemas. The property is suggest-able and will retrieve available database schemas during suggest values.

Example: SYS

Default value: [None] 

Table name

Required. Name of table to execute a select query on.

Example: people

Default value: [None] 

Where clause

Where clause of select statement. This supports document value substitution (such as $person.firstname will be substituted with the value found in the incoming document at the path). However, you may not use a value substitution after "IS" or "is" word. Please see the examples below.

Example: email = 'user@example.com' or email = $email
                    email IS NULL
                    email IS NOT NULLExamples:

Multiexcerpt include macro
nameME_DB_Snaps_Query_Examples
pageOracle - Update

Default value: [None] 

Order by 

Enter in the columns in the order in which you want to order by. The default database sort order will be used.

Example
     name
     email

Default value: [None] 

Limit rows


The number of rows the query should return.

Default value: [None] 

Output fields


Enter or select output field names for SQL SELECT statement. Fields available include:

  • out - console output
  • err - console error output
  • status - exit status (see FastExport reference manual for explanation)
  • script - generated FastExport script if user wants to try running it manually
  • sql - generated SQL statement if there's any question about what was done
  • logtable - name of random logtable used by FastExport application. Logtable names have the form SnapfeUUID where UUID is a standard 'random UUID' with all dashes replaced by underscores. This creates a huge tablename with essentially no chance of collision with an existing file. The logtable is deleted automatically.

To select all fields, leave it at default.

Example: email, address, first, last, etc.

Default value: [None] 

Multiexcerpt include macro
nameME_Number_of_retries
pageTeradata Execute
Multiexcerpt include macro
nameME_Number_of_retries_Desc
pageTeradata Execute
Multiexcerpt include macro
nameME_Retry_Interval
pageTeradata Execute
Multiexcerpt include macro
nameME_Retry_Interval_Desc
pageTeradata Execute
Fast Export


File Action


Required. Select an action to take when the specified file already exists in the directory. Options available include: Overwrite, Ignore, Error. 

Default value: Error 

FEXP Location

The location of the Teradata FastExport component.

Default value: /usr/bin/fexp  

Output File

Location of exported data file.

If there is a white space, then the path should be in quotes as per the Teradata documentation.

Default value: [None] 

Data Format

Export file format. Possible values are:

  • FASTLOAD
  • BINARY
  • TEXT
  • UNFORMAT

See the Format Syntax Element for the EXPORT command in the Teradata FastExport Reference for detailed information.

Default value: FASTLOAD. 

Date format


Required. Date format used in the output file in text mode. Options available include Integer and Text.

Default value: Integer 

Multiexcerpt include macro
nameSnap Execution
pageSOAP Execute

Multiexcerpt include macro
nameSnap_Execution_Introduced
pageAnaplan Read


Note

For the Suggest in the Order by columns and the Output fields properties, the value of the Table name property should be an actual table name instead of an expression. If it is an expression, it will display an error message "Could not evaluate accessor:  ..." when the Suggest button is pressed. This is because, at the time the Suggest button is pressed, the input document is not available for the Snap to evaluate the expression in the Table name property. The input document is available to the Snap only during the preview or execution time.


See Also

Insert excerpt
Teradata Snap Pack
Teradata Snap Pack
nopaneltrue