Versions Compared

Key

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

...

  • ELT Pipelines created prior to 4.24 GA release using one or more of the ELT Insert Select, ELT Merge Into, ELT Load, and ELT Execute Snaps may fail to show expected preview data due to a common change made across the Snap Pack for the current release (4.26 GA). In such a scenario, replace the Snap in your Pipeline with the same Snap from the Asset Palette and configure the Snap's Settings again.
  • In case you are writing into a Snowflake target table, this Snap attempts to create the target table even when it exists in the database.
  • Suggestions displayed for the Schema Name field in this Snap are from all databases that the Snap account user can access, instead of the specific database selected in the Snap's account or Settings.

...

Parameter NameData TypeDescriptionDefault ValueExample 
LabelString
Insert excerpt
File Writer
File Writer
nopaneltrue
ELT Insert-SelectInsert Employee Records
Get preview dataCheck box

Multiexcerpt include macro
namegetpreviewdata
pageELT Intersect

Not selectedSelected
Database NameString

Required. Enter the name of the database in which the target table is located. Leave it blank to use the database name specified in the account settings.

If your target database is Databricks Lakehouse Platform (DLP), you can, alternatively, mention the file format type for your table path in this field. For example, DELTA, CSV, JSON, ORC, AVRO. See Table Path Management for DLP section below to understand the Snap's behavior towards table paths.

N/A TESTDB
Schema Name (Not applicable to Databricks Lakehouse Platform)String

RequiredEnter the name of the database schema. In case it is not defined, then the suggestion for the schema name retrieves all schema names in the specified database when you click Image Modified.

Multiexcerpt macro
nameME_Schema_Name


  • Ensure that you include the exactly same schema name including the double quotes, if used, when you repeat the schema name in the Target Table Name field.
  • Leave this field blank if your target database is Databricks Lakehouse Platform.



N/A"TEST_DATA"
Target Table NameString

Required. The name of the table into which you want to insert the data. 

If your target database is Databricks Lakehouse Platform (DLP), you can, alternatively, mention the target table path in this field. Enclose the DBFS table path between two `(backtick/backquote) characters. For example, `/mnt/elt/mytabletarget`. See Table Path Management for DLP section below to understand the Snap's behavior towards table paths.

Multiexcerpt macro
nameME_Schema_And_Table_Names


  • Ensure that you include the exactly same schema name, if at all, including the double quotes as specified in the Schema Name field.



Note
  • If the target table does not exist, the Snap creates one with the name that you specify in this field and writes the data into it.
  • You can specify the table name without using double quotes (""). However, they must be used if you want to include special characters such as hyphens (-) in the table name.
  • A table name must always start with an alphabet.
  • Integers and underscores (_) can also be a part of the table name.
  • All characters are automatically converted to upper-case at the backend. Use double-quotes to retain lower casing.


N/A

"TEST_DATA"."DIRECT"

EMPLOYEE_DATA

EMPLOYEE_123_DATA

REVENUE"-"OUTLET

"net_revenue"

Target Table Hash Distribution Column (Azure Synapse Only)String/Expression

Specify the Hash distribution column name for the target table (in Azure Synapse), if the Snap creates a target table during the execution of the SnapIf the target table is created outside the Snap, you need not specify the target table column name.

  • If you specify the target table Hash distribution column, the table is Hash distributed. Azure Synapse needs a table to be always hash distributed for improved query performance.
  • If you do not specify the target table Hash Distribution Column, and if the Snap creates a target table, it is by default in Round Robin.
N/Avar table
Insert Expression

This field set enables you to specify the values for a subset of the columns in the target table. The remaining columns are assigned null values automatically. You must specify each column in a separate row. Click  to add rows. 

This field set consists of the following fields:

  • Insert Column
  • Insert Value
Note

You can use this field set to insert data only into an existing table. 


Insert ColumnStringEnter the name of the column in the target table to assign values.N/AORD_AMOUNT
Insert ValueStringEnter the value to assign in the specified column. Repeat the column name if you want to use the values in the source table. You can also use expressions to transform the values.N/A

ORD_AMOUNT

ORD_AMOUNT+20

OverwriteCheck boxSelect to overwrite the data in the target table. If not selected, the incoming data is appended. Not selectedSelected

...

ErrorReasonResolution

Invalid placement of ELT Insert Select Snap

You cannot use the ELT Insert Select Snap at the beginning of a Pipeline.Move the ELT Insert Select Snap to the middle or to the end of the Pipeline.

Snap configuration invalid

The specified target table does not exist in the database for the Snap to insert the provided subset values.Ensure that the target table exists as specified for the ELT Insert Select Snap to insert the provided subset values.
Database encountered an error during Insert Select processing.

Examples

Multiexcerpt macro
nameunioninsertselect

Merging Two Tables and Creating a New Table

We need a query with the UNION clause to merge two tables. To write these merged records into a new table, we need to perform the INSERT INTO SELECT operation. This example demonstrates how we can do both of these tasks.

First, we build SELECT queries to read the target tables. To do so, we can use two ELT Select Snaps, in this example: Read Part A and Read Part B. Each of these Snaps is configured to output a SELECT * query to read the target table in the database. Additionally, these Snaps are also configured to show a preview of the SELECT query's execution as shown:

Read Part A ConfigurationRead Part B Configuration

A preview of the outputs from the ELT Select Snaps is shown below:

Read Part A OutputRead Part B Output

Then, we connect the ELT Union Snap to the output view of the ELT Select Snaps. The SELECT * queries in both of these Snaps form the inputs for the ELT Union Snap. The ELT Union Snap is also configured to eliminate duplicates, so it adds a UNION DISTINCT clause.

Upon execution, the ELT Union Snap combines both incoming SELECT * queries and adds the UNION DISTINCT clause.

To perform the INSERT INTO SELECT operation, add the ELT Insert-Select Snap. We can perform this operation on an existing table. Alternatively, we can also use this Snap to write the records into a new table. To do so, we configure the Target Table Name field with the name of the new table.

The result is a table with the specified table name in the database after executing this Pipeline. 

...