Versions Compared

Key

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

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

In this article

Table of Contents
maxLevel2
absoluteUrltrue

Multiexcerpt include
templateData[]
MultiExcerptNameME_OE_ELT_Snap_Accounts
addpanelfalse
PageWithExcerptELT Aggregate

Overview

Use this Snap to perform build transformation-based SQL queries on the input tables. Transformations such as renaming columns, selecting a set of columns instead of all the columns, and any row-based SQL expressions. Use the Input Schema and Target Schema lists displayed on both sides of the Mapping Table to drag and drop entities from the schemas into the respective columns in the Mapping Table. This Snap also allows you to preview the result of the output query. You can validate the modified query using this preview functionality.

...

Image Added

Prerequisites

None.

Limitations

  • This Snap does not display the list of schema entities in the following scenarios:
    • Until the first validation of the Pipeline.
    • When the downstream Snaps are not configured to point to valid database table/columns.

Multiexcerpt include macro
nameME_ELT_GBQ_StandardSQL
pageELT Aggregate

Known Issue

...

None.

Snap Input and Output

Input/OutputType of ViewNumber of ViewsExamples of Upstream and Downstream SnapsDescription
Input 

Document

  • Min: 1
  • Max: 1
  • ELT Select
  • ELT Intersect
The SQL query in which you want to add the transformations.
Output

Document

  • Min: 1
  • Max: 1
  • ELT Insert-Select
  • ELT Unique
  • ELT Limit
The incoming SQL query with the specified transformations. 

Snap Settings

Info
titleSQL Functions and Expressions for ELT

You can use the SQL Expressions and Functions supported for ELT to define your Snap or Account settings with the Expression symbol = enabled, where available. This list is common to all target CDWs supported. You can also use other expressions/functions that your target CDW supports.


Parameter NameData TypeDescriptionDefault ValueExample 
LabelString
Insert excerpt
File Writer
File Writer
nopaneltrue
ELT TransformMap Data

Get preview data

Checkbox


Select this checkbox to include a preview of the query's output. The Snap performs limited execution and generates a data preview during Pipeline validation.

Info

...

In case of ELT Pipelines, only the SQL query flows through the Snaps but not the actual source data. Hence, the preview data for a Snap is the result of executing the SQL query that the Snap has generated in the Pipeline.


The number of records displayed in the preview (upon validation) is the smaller of the following:

  • The number of records available upon execution of the SQL query generated by the Snap.

  • The value set in the Preview Data Count setting (default is 50 records).


Note

Rendering Complex Data Types in Databricks Lakehouse Platform

Based on the data types of the fields in the input schema, the Snap renders the complex data types like map and struct as object data type and array as an array data type. It renders all other incoming data types as-is except for the values in binary fields are displayed as a base64 encoded string and as string data type.


Not selected Selected
Pass throughCheckboxSelect this to include the columns in the upstream Snap's query projection along with the existing columns that are specified in the mapping table.Not selectedSelected
Input Schema

Use this field set to select or drag and drop fields available in the input schema coming from the upstream Snap into the Mapping Table and define the expression

...

needed for the transformation. 

This field set contains the following fields.

  • Select All
  • Deselect All
  • (Search/Find) box
  • All
Note
titleRendering Complex Data Types in Databricks Lakehouse Platform

Based on the data types of the fields in the input schema, this section of the Snap renders the preview of complex data types like map and struct as object data type and array as an array data type. It renders all other incoming data types as-is except for the values in binary fields are displayed as a base64 encoded string and as string data type.


Select AllHyperlink

Click this hyperlink to select (the

...

checkboxes of) for using all the fields from the input schema to define your transformation criteria in the Mapping table. Drag and drop the selected fields to populate all their field names in the Expression column.

N/AN/A
Deselect AllHyperlinkClick this hyperlink to deselect all the selected

...

checkboxes to restart selecting the fields needed to define your transformation criteria.N/AN/A
(Search/Find)StringStart entering a field name to filter the list by the entered keyword and select the fields needed for defining the transformation.N/AN/A
AllDrop-down list

Change the selection in this drop-down list to filter the list of fields displayed in the Input Schema. The available options are:

  • All. To view all fields available in the Input Schema.
  • Mapped. To view only the input fields that are selected/mapped in the Mapping table.
  • Unmapped. To view only the input fields that are not selected/mapped in the Mapping table.
AllSelected
Mapping Table

This field set enables you to specify the transformations you want to perform on the columns/records in the source table.

Each different transformation must be specified in a separate row. Click + to add a new row.

This field set consists of the following fields:

  • Expression
  • Target Path
Note

The output query contains only those columns that are specified here unless the Pass through check box is also selected.


ExpressionString/ExpressionThe column and the transformation operation that you want on that column.N/A

EMPLOYEE

ORDER_NUMBER + 1

Target PathString

The name to be assigned to the column.

Info

If the Target Path field is empty for a specified expression, the respective column is deleted from the output. See the Example below.


N/A

EMPLOYEE

ORDER_NUMBER_NEW

Output Schema

Use this field set to select or drag and drop fields available in the output schema coming from the downstream Snap into the Mapping Table and define the expression, as needed for the transformation. Output schema fields are populated upon validation of the Pipeline and this depends on the downstream Snap's configuration.

This field set contains the following fields.

  • Select All
  • Deselect All
  • (Search/Find) box
  • All
Note
titleRendering Complex Data Types in Databricks Lakehouse Platform

Based on the data types of the fields in the input schema, this section of the Snap renders the preview of complex data types like map and struct as object data type and array as an array data type. It renders all other incoming data types as-is except for the values in binary fields are displayed as a base64 encoded string and as string data type.


Select AllHyperlink

Click this hyperlink to select (the check boxes of) for mapping all the fields from the output schema with corresponding input field expressions (your transformation criteria) in the Mapping table. drag and drop the selected fields to populate all their field names in the Target Path column.

N/AN/A
Deselect AllHyperlinkClick this hyperlink to deselect all the selected check boxes to restart selecting the output fields needed to define your transformation criteria.N/AN/A
(Search/Find)StringStart entering a field name to filter the list by the entered keyword and select the fields to include in the transformation criteria.N/AN/A
AllDrop-down list

Change the selection in this drop-down list to filter the list of entries displayed in the Output Schema. The available options are:

  • All. To view all fields available in the Output Schema.
  • Mapped. To view only the target fields that are selected/mapped in the Mapping table.
  • Unmapped. To view only the target fields that are not selected/mapped in the Mapping table.
AllSelected
Input PreviewDisplay-onlyThis section of the Snap's Settings displays the preview (partial result) of the incoming data from the previous Snap in the Pipeline.N/AN/A
Output PreviewDisplay-onlyThis section of the Snap's Settings displays the preview (partial result) of applying the transformation criteria defined in the Mapping table.N/AN/A
Get preview dataCheck box
Multiexcerpt include macro
namegetpreviewdata
pageELT Intersect
Not selectedSelected

Troubleshooting

None.

Examples

Retrieving Specified Columns from a Table

We need a SELECT query with only the columns that we want to retrieve. This example shows how we can use the ELT Transform Snap to achieve this result.

Image Modified

First, we use the ELT Select Snap to build a query to retrieve all records from the target table.

Image Modified

Upon execution, this Snap builds the query as shown below:

Image Modified

The table has several columns. But, we want to retrieve only the CUST_CODE and ORD_AMOUNT columns. Therefore, we add the ELT Transform Snap and configure it as shown below:

Image Modified

Based on this configuration, the ELT Transform Snap builds a query as shown below:

Image Modified

We can add also an ELT Insert-Select Snap downstream and write the result of this query into another table.

Download this Pipeline.

Using Empty Target Paths to Omit Rows from the Snap Output

We can use the ELT Transform Snap to retrieve information from specific columns in a database table or the input schema instead of returning data from all the available columns. This example shows how we can use the ELT Transform Snap to achieve this result.
Image Modified

First, we configure the ELT Select Snap to build a query to retrieve all records from the "TEST_DATA"."ORG1" table.
Image Modified

Next we use the ELT Transform Snap and configure the Expressions and Target Path in the Mapping table as shown below. Note that we intentionally leave the Target Path blank for DEPT and LOCAL fields, so as to not retrieve these columns in the query. We ensure to select Pass through to avoid duplicate fields in the query if same fields are present in the Mapping table.
Image Modified

Upon validation, the ELT Transform Snap builds a query as shown below. Note that DEPT and LOCAL fields do not appear in the query.
Image Modified

Download the Pipeline.

Downloads

Note
titleImportant Steps to Successfully Reuse Pipelines
  1. Download and import the Pipeline into SnapLogic.
  2. Configure Snap accounts as applicable.
  3. Provide Pipeline parameters as applicable.

Attachments
patterns*.slp, *.zip


Insert excerpt
ELT Snap Pack
ELT Snap Pack
nopaneltrue


See Also