The SYSCS_UTIL.SYSCS_IMPORT_DATA_BULK system procedure supports all functionalities of SYSCS_UTIL.SYSCS_IMPORT_DATA with the additional feature to skip column headers in the input file and recognize columns in the input file by name that are parsed to the COLUMNINDEXES argument.
Derby issues a COMMIT or a ROLLBACK statement after each import and export procedure is run (a COMMIT if the procedure completes successfully, a ROLLBACK if it fails). For this reason, you should issue either a COMMIT or ROLLBACK statement to complete all transactions and release all table-level locks before you invoke an import or export procedure.
For more information on using this procedure, see the section "Importing and exporting data" in the Derby Server and Administration Guide.
SYSCS_UTIL.SYSCS_IMPORT_DATA_BULK (IN SCHEMANAME VARCHAR(128), IN TABLENAME VARCHAR(128), IN INSERTCOLUMNS VARCHAR(32672), IN COLUMNINDEXES VARCHAR(32672), IN FILENAME VARCHAR(32672), IN COLUMNDELIMITER CHAR(1), IN CHARACTERDELIMITER CHAR(1), IN CODESET VARCHAR(128), IN REPLACE SMALLINT, IN SKIP SMALLINT)
No result is returned from the procedure.
If you create a schema, table, or column name as a non-delimited identifier, you must pass the name to the import procedure using all uppercase characters. If you created a schema, table, or column name as a delimited identifier, you must pass the name to the import procedure using the same case that was used when it was created.
If authentication and SQL authorization are both enabled, only the database owner has execute privileges on this procedure by default. See "Configuring user authentication" and "Configuring user authorization" in the Derby Security Guide for more information. The database owner can grant access to other users. The user must also have INSERT privileges on the table.
Pet Name,Kind of Animal,Age Rover,Dog,4 Spot,cat,2 Squawky,Parrot,37
CALL SYSCS_UTIL.SYSCS_IMPORT_DATA_BULK (NULL, 'PET', NULL, '\"Pet Name\",2,3', 'petlist.del', NULL, NULL, NULL, 0, 1)This procedure identifies the column by name as given in the example. When data is imported from the input file, first line in the input file is ignored. That is the number of lines given in the SKIP argument. Rest of the lines in the input file are imported. This means that first line
Pet Name,Kind of Animal,Ageis ignored and next three lines,
Rover,Dog,4 Spot,cat,2 Squawky,Parrot,37are imported.
Pet,Kind,Age Name,of, ,Animal, Rover,Dog,4 Spot,cat,2 Squawky,Parrot,37
CALL SYSCS_UTIL.SYSCS_IMPORT_DATA_BULK (NULL, 'PET', NULL, '1,\"Kind of Animal\",3', 'petlist.del', NULL, NULL, NULL, 0, 3)When data is imported from the input file, first three lines in the input file are ignored. That is the number of lines given in the SKIP argument. Rest of the lines in the input file are imported. This means that first three lines
Pet,Kind,Age Name,of, ,Animal,are ignored and next three lines,
Rover,Dog,4 Spot,cat,2 Squawky,Parrot,37are imported.