////
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at
  http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
////
:documentationPath: /workflow/actions/
:language: en_US
:description: The Bulk load into MSSQL action bulk loads data from a file into MSSQL.

= Bulk load into MSSQL

== Description

The `Bulk load into MSSQL` action bulk loads data from a file into MSSQL.

Contrary to the transform bulk loaders, this action requires a pre-existing file that is bulk loaded to MS SQL.

== Options

=== General tab

[options="header", width="90%", cols="1,3"]
|===
|Option|Description
|Action name|The name of the workflow action.
2+|Target Table
|Connection|The database connection.
|Target schema|The target schema.
|Target table name|The target table.
|Truncate table|Whether or not to truncate the table before starting the bulk load.
2+|Data file
|Source File name|The file to bulk load into MSSQL.
|Data file type|char, native, widechar, widenative
|Fields terminated by|The field separation character.
|Rows terminated by|The row termination character.
|===

=== Advanced tab

[options="header", width="90%", cols="1,3"]
|===
|Option|Description
|Codepage|OEM, ACP, RAW, specific
|Specific codepage|Code page to use when specific is selected.
|Format file|Path to format file.
|Browse|Browse the filesystem to choose a format file.
|Fire triggers|
|Check constraints|
|Keep nulls|
|Keep identity|
|Tablock|
|Start at line|At which line to start.
|End at line|At which line to end.
|Order by|Which field to order with.
|Direction|Ordering ascending (asc) or descending (desc).
|Error file|Path to the error file.
|Add date time|Whether or not to add the date and time.
|Max errors|
|Batch size|
|Rows per batch|
|Add file to result filenames|
|===