Versions Compared

Key

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

...

Type

Format

Number of Views

Examples of Upstream and Downstream Snaps

Description

Input

Document

  • Min: 1

  • Max: 2

  • JSON Generator

  • Binary to Document

By default, this Snap has one document input view by default. A second view can be added for metadata for the table as a document 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 second output of a database Select Snap. If the schema is from a different database, there is no guarantee that all the data types would be properly handled.

The target table's columns need to be mapped upstream using a Mapper Snap. The Mapper Snap will provide the target schema, which reflects the target table's schema. Learn more: SQL Server - Bulk Load | Table Creation

Output

Document

  • Min: 0

  • Max: 1

  • JSON Generator

  • Binary to Document

A document that represents the result of the bulk load 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:

  • Stop Pipeline Execution: Stops the current pipeline execution if the Snap encounters an error.

  • 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.

...

Field Name

Field Type

Description

Label*

Default ValueSnowflake - Bulk Load
Example: Load Employee Tables

String

Specify a unique name for the Snap.

Schema Name

Default Value: N/A
Example: schema_demo

String/Expression/Suggestion

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

You can pass the values using the pipeline parameters but not the upstream parameter.

Table Name*

Default Value: N/A
Example: employees_table

String/Expression/Suggestion

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

  • You can pass the values using the pipeline parameters but not the upstream parameter.

  • Currently, the BCP utility in the Linux environment has a limitation while processing the table names. When loading the data into a selected table and If the table name contains the characters '$%' or '!$', the combination works fine, however, BCP does not support if the table name contains the characters vice-a-versa as'%$' and '$!'.

Examples: Supported by BCP: "dbo"."sqldemo#^&$%"   Not supported by BCP: "dbo"."sqldemo#^&%$"

Create table if not present

Default Value: Deselected

Checkbox

Select this checkbox to enable the Snap to automatically create a table if a table does not exist.

The data types for the columns in the new table depend on the data types from the upstream Snap. If a second input view exists, the Snap reads and uses the data types for the columns from this input view. Learn more: SQL Server - Bulk Load | Table Creation

BCP absolute path

Default Value: N/A
Example: C:\bcp.bat

String

Specify the absolute path of the bcp utility program in JCC's file system. If empty, the Snap looks for it in JCC's environment variable PATH.

bcp.bat should include the ".exe" extension to ensure the executable is actually referenced.

Handling Unrecognized Character sets in the Data set. As the Snaplex uses the OS's default character set, it cannot recognize characters in other languages. Due to this, unrecognized characters in the data set are replaced with junk values when performing bulk load operations. To mitigate this, create a bcp.bat file and include the following line:

Paste code macro
bcp.exe %* -C 1252

Use the path to this bcp.bat file in the BCP absolute path.

This is only applicable to Windows-based Snaplexes.

Maximum error count*

Default Value10
Example: 12

Integer

Specify the maximum number of rows which can fail before the bulk load operation is stopped.

Batch size

Default Value: N/A
Example: 1000

Integer/Expression

Specify the number of records batched per request. If the input has 10,000 records and the batch size is set to 100, the total number of requests batched would be 100.

Minimum Value: 1

Snap Execution

Default Value: Execute only
Example: Validate & Execute

Dropdown list

Select 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.

...