Catalog Insert

Overview

The Catalog Insert Snap enables you to enrich your metadata catalog by inserting metadata into the catalog tables.

Note:

Accounts are not used with this Snap.



Prerequisites

Write access to the SnapLogic data catalog.

Known issues

In Snaplex version 4.38, pipelines using the Catalog Insert Snap no longer populate the Data Catalog tables in Manager with metadata.

Workaround: Do not use Snaplex version 4.38 to run pipelines using the Catalog Insert Snap.

Snap views

View Description Examples of upstream and downstream Snaps
Input This Snap has exactly one document input view.

A document containing metadata to be written into the metadata catalog. This document should have a field named schema with the document schema.

Output This Snap has at most one document output view.

A document containing status messages on the result of the insert operation.

Error

Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter when running the pipeline by choosing one of the following options from the When errors occur list under the Views tab. The available options are:

  • Stop Pipeline Execution Stops the current pipeline execution when an error occurs.
  • Discard Error Data and Continue Ignores the error, discards that record, and continues with the remaining records.
  • Route Error Data to Error View Routes the error data to an error view without stopping the Snap execution.

Learn more about Error handling in Pipelines.

Snap settings

Legend:
  • Expression icon (): Allows using pipeline parameters to set field values dynamically (if enabled). SnapLogic Expressions are not supported. If disabled, you can provide a static value.
  • SnapGPT (): Generates SnapLogic Expressions based on natural language using SnapGPT. Learn more.
  • Suggestion icon (): Populates a list of values dynamically based on your Snap configuration. You can select only one attribute at a time using the icon. Type into the field if it supports a comma-separated list of values.
  • Upload : Uploads files. Learn more.
Learn more about the icons in the Snap settings dialog.
Field / Field set Type Description
Label String

Required. Specify a unique name for the Snap. Modify this to be more appropriate, especially if more than one of the same Snaps is in the pipeline.

Default value: Catalog Insert

Example: Catalog Insert
Table Name Dropdown list/Expression

Required. The location and name of the table that you want to update. You can either enter this information manually or you can select the table from the suggestible drop-down.

Default value: None.

Example: /<Org>/<Project_Space>/<Project>/<Table_Name>
Data location String/Expression

Required. The location of the file whose metadata you want to insert. This is typically a location in AWS S3, and can either be specified as a URL string, a pipeline parameter, or an upstream parameter.

Default value: None.

Example: parquetesting1.parquet
Create table if not present Checkbox

Required. Enables you to specify whether the table should be automatically created if not already present. Select this check box to create the table.

Warning: Selecting this option creates a table with all columns of the type STRING.

Default status: Deselected

Insert Mode Dropdown list
Available insert modes when loading data into a table.
  • OVERWRITE - Loads rows into the target table, replacing the existing rows.
  • APPEND - If data already exists in the table, the new rows are appended to the table. If data does not already exist, the new rows are simply loaded.
  • ERROR_IF_EXISTS - Throws an error if a table with the same name already exists.
  • IGNORE - Does not insert data into the table.

Default value: Overwrite

Partition Keys

The partition keys for which you want to insert the metadata. You list these out by specifying Key Column and Key Value combinations to identify the precise row and column from which to create a partition

Key Column String/Expression The name of the column that contains the value that you want to use to specify the partition.

Default value: None.

Example: airline_code

Key Value Integer/Expression The value in the column listed in the Key Column field that you want to use to specify the partition.

Default value: None.

Example: 10

Custom Metadata Enables you to specify the custom metadata values in Key and Value pairs.
Key String/Expression

Enables you to add a key that you want to associate with the new metadata you want to add.

Default value: None.

Example: airline_region
Value Integer/Expression

Enables you to add the value that you want to associate with the key as part of the new metadata that you want to upload.

Default value: None.

Example: APAC
Snap execution Dropdown list
Choose one of the three modes in which the Snap executes. Available options are:
  • Validate & Execute: Performs limited execution of the Snap and generates a data preview during pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during pipeline runtime.
  • Execute only: Performs full execution of the Snap during pipeline execution without generating preview data.
  • Disabled: Disables the Snap and all Snaps that are downstream from it.

Default value: Execute Only

Default value: Validate & Execute

Examples