db_load_sql_data (public)

 db_load_sql_data [ -dbn dbn ] [ -callback callback ] file

Defined in packages/acs-tcl/tcl/01-database-procs.tcl

Loads a CSV formatted file into a table using PostgreSQL's COPY command or Oracle's SQL*Loader utility. The filename format consists of a sequence number used to control the order in which tables are loaded, and the table name with "-" replacing "_". This is a bit of a kludge but greatly speeds the loading of large amounts of data, such as is done when various "ref-*" packages are installed.

Switches:
-dbn (optional)
The database name to use. If empty_string, uses the default database.
-callback (optional, defaults to "apm_ns_write_callback")
Parameters:
file (required)
Filename in the format dd-table-name.ctl where 'dd' is a sequence number used to control the order in which data is loaded. This file is an RDBMS-specific data loader control file.

Partial Call Graph (max 5 caller/called nodes):
%3 ad_file ad_file (public) ad_tmpdir ad_tmpdir (public) apm_callback_and_log apm_callback_and_log (public) db_driverkey db_driverkey (public) db_get_database db_get_database (public) db_load_sql_data db_load_sql_data db_load_sql_data->ad_file db_load_sql_data->ad_tmpdir db_load_sql_data->apm_callback_and_log db_load_sql_data->db_driverkey db_load_sql_data->db_get_database

Testcases:
No testcase defined.
[ show source ]
Show another procedure: