Versions Compared

Key

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

On this page

Table of Contents
maxLevel2
absoluteUrltrue

...

Use this Snap to bulk load data into PostgreSQL tables. If the target table does not exist PostgreSQL, you also have the provision to create the table. 
Image RemovedImage Added

This Snap supports both binary and document inputs. You can configure the input view in the Views tab.  

Image RemovedImage Added

Additionally, this Snap supports a maximum of two input streams which is useful in sending table schema to the Snap if the target table does not exist. You can mix and match binary and document input views based on the input type.

Prerequisites

None.

Enhances the https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1438093/SAP+HANA+Snap+Pack with following additions:

...

.

...

...

...

Support for Ultra Pipelines

Does not work in Ultra Pipelines

Limitations

If the target table does not exist and the input is binary, the Snap does not fetch the table's schema from the input. The table's schema must be passed to the Snap through the second input view. 

Troubleshooting

None.

Snap Input and Output

Input/OutputType of ViewNumber of ViewsCompatible Upstream and Downstream SnapsDescription
Input 
  • Document
  • Binary
  • Min: 1
  • Max: 2
  • Mapper Snap
  • Copy Snap
  • File Reader
  • PostgreSQL Select

The data to be loaded into the PostgreSQL table. This Snap has one document input view by default.

A second view can be added for metadata for the table as a binary or document stream so that the target absent table can be created in the database with a similar schema as the source table. This schema is usually from the output of a database Select Snap.

Note

If the schema is from a different database, there is no guarantee that all the data types will be properly handled.


OutputDocument
  • Min: 0
  • Max: 1
  • JSON Formatter + File writer

The Snap outputs one document specifying the status, with the records count that are being inserted into the table. Any error occurring during the process is routed to the error view.

Snap Settings

The N
Parameter Field NameData TypeField DependencyDescriptionDefault ValueExample 
Label*StringN/A

Specify the name for the account. We recommend you to update the account name, if there is more than one account in your project.

Default Value: N/A
ExampleLoad Employee Data

Schema name

StringThe N/A

Specify the database schema name in PostgreSQL. In case it is not defined, then the suggestion for the Table name retrieves all table names of all schemas. The property is suggestible and will retrieve available database schemas during suggest values.

N

Default Value: N/A

Employee

ExampleEmployee 

Table name*StringRequired. The N/A

Specify the PostgreSQL table on which to execute the bulk load operation.

N

Default Value: N/A
ExampleEmployee.PersonnelInformation

Create table if not presentN/A

If selected, creates a table in PostgreSQL in case of no existing table. 

Note

If the input is binary, then the Snap does not fetch the table's schema from the input. You must use the second input view and pass the table schema from there.

Not selectedN

Multiexcerpt include macro
nameME_Create_Table_Automatically_2_Inputs
pageRedshift - Bulk Load

Default Value: Not selected
Example: N/A

Columns--Specifies N/A--

Specify the columns to be loaded/copied. If you do not configure this field - set is not configured, then all columns in the input data stream are loaded into the target table. You can also set how the null values should be handled for each column.

Note
  • Column order is critical when using the binary input view.
  • Force Non-Null and Force Null can both be selected simultaneously. In such cases, the Snap converts quoted null strings to null values and unquoted null strings to empty strings.
--

Default Value: N/A
ExampleLoad Employee Data

ColumnStringThe N/A

Specify the name of the column/field. This is a suggestible field and lists all field names in the input.

N

Default Value: N/A
Exampleemp_name

Force Non-NullN/A

Specifies that the Snap should Select this check box to not match the selected column's value against the null string.The  The Snap reads empty null strings as zero-length strings rather than nulls, even when they are not quoted.

Not

Default Value: Not selected

N

Example: N/A

 Force NullN/A

Specifies that the Snap must Select this check box to match the selected column value against the null string, even if it has been quoted. If a match is found, the field value is set to NULL.

By default, where the null string is empty, the Snap converts a quoted empty string into NULL.

Not

Default Value: Not selected

N

Example: N/A

FormatN/A

Applicable Choose the data format to be written. This field is applicable only when using the binary input view. Specifies the data format to be written. 

  • Text - tab-separated-values (default)
  • CSV - comma-separated-values
  • Binary - PostgreSQL specific format

Default ValueText
ExampleCSV

Header ProvidedN/AApplicable

Select this check box to include the input data has a header. Applicable only when using binary input view and CSV option in the Format field.

Specifies that the input data has a header. 
Not selectedN

Default Value: Not selected
Example: N/A

EncodingN/A

Specifies Choose the encoding to be used. This is limited to the encodings supported by the PostgreSQL server. Available The available options are:

  • ABC
  • ALT
  • BIG5
  • EUC_CN
  • EUC_JIS_2004
  • EUC_JP
  • EUC_KR
  • EUC_TW
  • GB18030
  • GBK
  • ISO88591
  • ISO885910
  • ISO885913
  • ISO885914
  • ISO885915
  • ISO885916
  • ISO88592
  • ISO88593
  • ISO88594
  • ISO88599
  • ISO_8859_5
  • ISO_8859_6
  • ISO_8859_7
  • ISO_8859_8
  • JOHAB
  • KOI8
  • KOI8R
  • KOI8U
  • LATIN1
  • LATIN2
  • LATIN3
  • LATIN4
  • LATIN5
  • LATIN7
  • LATIN9
  • Mskanji
  • SHIFT_JIS_2004
  • SJIS
  • SQL_ASCII
  • ShiftJIS
  • TCVN
  • TCVN5712
  • UHC
  • UTF8
  • Unicode
  • VSCII
  • WIN
  • WIN1250
  • WIN1251
  • WIN1252
  • WIN1253
  • WIN1254
  • WIN1255
  • WIN1256
  • WIN1257
  • WIN1258
  • WIN866
  • WIN874
  • WIN932
  • WIN936
  • WIN949
  • WIN950
  • Windows932
  • Windows936
  • Windows949
  • Windows950

Default ValueUTF8
Example: Unicode

Snap ExecutionN/A

Specifies the execution typeSelect one of the three modes in which the Snap executes. Available options are:

  • Validate & Execute: Performs limited execution of the Snap (up to 50 records) , and generates a data preview during Pipeline validation; . Subsequently, performs full execution of the Snap (unlimited records) during Pipeline executionruntime.
  • Execute only: Performs full execution of the Snap during Pipeline execution ; does not execute the Snap during Pipeline validationwithout generating preview data.
  • Disabled: Disables the Snap and , by extension, its downstream Snaps.all Snaps that are downstream from it.

Default ValueExecute only
ExampleValidate & Execute

See Also

...