Oracle - Bulk Load

Oracle - Bulk Load

In this article

Overview

You can use this Snap to process data in bulk. The input data is first written to either a temporary data file (on a Windows JCC) or a named pipe (on a Linux JCC). Then the Oracle SQL*Loader loads the data from the data file/named pipe into the target table.

  • The Oracle Bulk Load Snap uses Oracle SQL*Loader internally to perform the bulk load action. You must install sqlldr utility for the Snap to run on Groundplex. The SnapLogic Platform does not support the installation of utilities or processes on Cloudplexes. Learn more.

  • This Snap uses EZCONNECT to connect to Oracle. It does not use TNSNames or LDAP connections. 

 

Snap type:

Write

Known Issues:

  • When processing data, the Oracle Bulk Load Snap executes in an infinite loop when database storage reaches its full capacity.

  • Oracle - Bulk Load Snap does not support Kerberos authentication for Oracle.

Support and limitations:

Columns in a table that do not contain actual values but are generated based on a formula are referred as virtual columns. Tables containing virtual columns cannot be bulk loaded using this Snap. The table must only contain actual values to be bulk loaded. A workaround for this issue is to use a view that specifies only the non-virtual columns and use that view for the bulk load. For more information about creating a view in the Oracle database, refer to Creating a view in Oracle database.

The BLOB type is not supported by this Snap.   

Support for Ultra pipelines

Does not work in Ultra Pipelines.

Account: 

This Snap uses account references created on the Accounts page of SnapLogic Manager to handle access to this endpoint. See Oracle Account for information on setting up this type of account.

Views:

Input

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.

Output

This Snap has at most one document output view.

Error

This Snap has at most one document error view and produces zero or more documents in the view. All error messages for rejected input data are routed to the error view AFTER the whole data loading execution is done, because those messages are extracted from the log file of Oracle SQL*Loader which is only available after the Oracle SQL*Loader finishes the loading.

Settings

Label*

 

Specify the name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your Pipeline.

Schema name

 

Specify the database schema name. The suggestions in the Schema field are populated only when at least a single table exists in the schema. If no tables exist to use that schema, only SYS, SYSTEM, and XDB are populated.

The values can be passed using the Pipeline parameters but not the upstream parameter.

Default Value: [None]
Example: SYS

Table name*

 

Specify the table that the rows will be inserted into. This list is populated based on the tables associated with the selected schema.

The values can be passed using the Pipeline parameters but not the upstream parameter.

Default Value: [None]
Example: people

Create table if not present

 

Default Value: Not selected

Sqlldr absolute path

 

Specify the absolute path of the sqlldr program in the JCC's file system. If empty, the Snap will look for it in the JCC's environment variable PATH.

On Windows, a value must be specified and must be entered manually and the path to the sqlldr executable should include the ".exe" extension to ensure the executable is actually referenced.

Default Value: [None]

Example/u01/app/oracle/product/11.2.0/xe/bin/sqlldr (For Linux)

              C:\app\Administrator\product\11.2.0\client_1\bin\sqlldr.exe (For Windows) 

Insert mode

 

Available insert modes when loading data into table.

  • INSERT - Load rows only if the target table is empty.

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

  • REPLACE - First delete all the rows in the existing table and then load rows.

  • TRUNCATE - First truncate the table and then load rows.

Default Value: APPEND
See this doc for more information.

Maximum error count*

 

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

Default Value50 
Example:10 (if you want the Pipeline execution to continue as far as the number of failed records are less than 10)

Use direct path load

 

Select this check box to use direct path load mode of SQLLDR program. Typically, used when loading large data sets. This substantially improves the bulk load performance by reducing loading time.

Default Value: Selected 

Skip virtual columns

Select this checkbox to skip virtual columns to prevent errors while loading data.

Default Value: Selected

Additional SQL Loader Parameters

Use this field set to define additional SQL Load parameters if any. This field set contains Param Name and Param Value fields.

Parameter Name

Choose the parameter name for SQL. Available options are:

  • BINDSIZE

  • COLUMNARRAY ROWS

  • DIRECT

  • LOAD

  • MULTITHREADING

  • PARALLEL

  • READSIZE

  • RESUMABLE

  • RESUMABLE_NAME

  • RESUMABLE_TIMEOUT

  • ROWS

  • SILENT

  • SKIP

  • SKIP_INDEX

  • MAINTENANCE

  • SKIP_UNUSABLE_INDEXES

  • STREAMSIZE

See SQL* Loader parameters for more information.

Default Value: N/A
Example: COLUMNARRAYROWS

Parameter Value

Specify the value for the parameter selected above.

Default Value: N/A
Example: 2000

Column Length Overrides

Use this field set to define values for overriding the column length that includes CLOB (Character Large Object) and NCLOB (National Character Large Object) data types. Add each column in a separate row. The field set contains the following fields:

  • Column Name

  • Length

Column Name

Specify or select the name of the column in the table that you want to load.

Default Value: N/A
Example: DESCRIPTION, MESSAGE_BODY

Length (in bytes)

Specify a value (in bytes) for the column length.

Default Value: N/A
Example: 10

Example


This example loads 6 records to table TECTONIC.TERENCE_BULK_TEST2 with Oracle Bulk Load Snap, and three of them are invalid records which cannot be inserted and will be routed to the error view.

 

The definition of Table TECTONIC.TERENCE_BULK_TEST2 :

CREATE TABLE "TECTONIC"."TERENCE_BULK_TEST2" ( "id" NUMBER, "first_name" VARCHAR2(4000), "last_name" VARCHAR2(4000) )

 

The input data defined in JSON Generator Snap:

There are 3 rows of data whose ID column are strings, which is invalid when inserting into table TECTONIC.TERENCE_BULK_TEST2.

The settings of the Oracle Bulk Load Snap:

 

The output of output view:

The output of the error view, the three invalid rows are routed here: