In this article

Overview

Use this Snap to combine the incoming SQL queries and add a UNION ALL or UNION DISTINCT SQL operator between them. The UNION ALL SQL operator is used to combine the result of two or more SQL SELECT statements. The UNION DISTINCT SQL operator does the same and removes duplicate rows.

This Snap also allows you to preview the result of the output query. You can validate the modified query using this preview functionality.

Provide a functional overview of the Snap. Do not mention anything about the Snap's internal technology or techniques. The user should be able to understand what the Snap. Include a screenshot of a well-configured Snap 600px.  

Prerequisites

  • Two or more SQL SELECT queries.
  • The source tables in the SQL SELECT statements must have the same number of columns.
  • The column data types of each of the source tables also need to match.

Limitation

Known Issues

Snap Input and Output

Type of view: Document/Binary/Both. Get number of views from the Views tab in the Snap. List at least three compatible Snaps in each category. Provide a brief of the input/output required. If the input/output is optional then preface the description with "Optional." For example, "Transaction data complying with the Orderful schema as a JSON document."

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

Document

  • Min: 2
  • Max: No limit
  • ELT Select
  • ELT Intersect
  • ELT Copy
The SQL SELECT statements that you want to combine with a UNION DISTINCT or UNION ALL operator.
Output

Document

  • Min: 1
  • Max: 1
  • ELT Insert-Select
  • ELT Limit

The modified SQL query with a UNION DISTINCT or UNION ALL operator. 

Snap Settings

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


ELT UnionCombine Employee Records
Eliminate duplicatesCheck boxSelect to use the UNION DISTINCT operator instead of the UNION ALL operator.Not selectedSelected
Get preview dataCheck boxNot selectedSelected

Troubleshooting

None.

Examples

Download this Pipeline.

Downloads

  1. Download and import the Pipeline into SnapLogic.
  2. Configure Snap accounts as applicable.
  3. Provide Pipeline parameters as applicable.



Edit the Excerpt Include macro below to link to the Snap Pack page for this Snap page. Ensure that the heading Snap Pack History is not within the Snap Pack's history Excerpt. 


See Also

Provide links to the endpoint's official documentation, any relevant or related internal documentation, and any other links you have referred to on this page. Care should be taken when referencing external sites/documentation that it is an official site/documentation. Do not refer to forums such as stackoverflow.