Versions Compared

Key

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

...

The SQL Server - Bulk Load Snap is a Write-type Snap that inserts bulk data in one request.

Prerequisites

The Install the BCP utility must be installed on the Groundplex nodes where you want to execute this Snap. To install the BCP utility on a Groundplex:

Install BCP version 17.10.0001.1or any version below 18 because 18 and higher versions are not supported.

  1. Download and install the BCP Utility in your Windows or Linux environment. For details on doing so, use the following links:

    1. Installing BCP on Linux

    2. Installing BCP on Windows

  2. Verify that you can run the bcp command. To verify BCP installation, enter bcp on the terminal or the command line console and press Enter.

    Paste code macro
    /u01/sqlncli> bcp

    The output should look similar to the following. These are the command-line options that can be used with the BCP utility. If you see this output, it indicates that the BCP utility is installed and ready for use.

    Paste code macro
    [-a packet_size]
        [-b batch_size]
        [-c]
        [-C { ACP | OEM | RAW | code_page } ]
        [-d database_name]
        [-e err_file]
        [-E]
        [-f format_file]
        [-F first_row]
        [-G Azure Active Directory Authentication]
        [-h"hint [,...n]"]
        [-i input_file]
        [-k]
        [-K application_intent]
        [-l login_timeout]
        [-L last_row]
        [-m max_errors]
        [-n]
        [-N]
        [-o output_file]
        [-P password]
        [-q]
        [-r row_term]
        [-R]
        [-S [server_name[\instance_name]]
        [-t field_term]
        [-T]
        [-U login_id]
        [-v]
        [-V (80 | 90 | 100 | 110 | 120 | 130 ) ]
        [-w]
        [-x]

  3. Ensure the path to the bcp command is correctly provided in the Snap.

...

Support for Ultra Pipelines

  • Does not

...

...

Behavior Change

  • Before the 4.33patches21119 release, empty strings and null values were treated as null when loaded into the SQL server. However, starting from the 433patches21119 release, data in the format of an empty string inserted into a string-based column is stored as an empty string in the SQL server. Similarly, inserting null data into a string-based column is stored as null in the SQL server.
    To ensure consistent handling of both empty strings and null values, we recommend you to update the data to match how you would like it to be represented in the database before performing a bulk load operation.

...

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.

Snap Settings

Info
  • Asterisk (*): Indicates a mandatory field.

  • Suggestion icon ((blue star)): Indicates a list that is dynamically populated based on the configuration.

  • Expression icon ((blue star)): Indicates whether the value is an expression (if enabled) or a static value (if disabled). Learn more about Using Expressions in SnapLogic.

  • Add icon ((blue star)): Indicates that you can add fields in the field set.

  • Remove icon ((blue star)): Indicates that you can remove fields from the field set.

...