How do I create and manage custom auxiliary database table attributes in NSP?
Purpose
Steps
1 |
If you are creating a custom table, configure the elements in a table definition XML file using the format described in Table definition file format, and store the file securely in a remote location. |
2 |
If you are adding data to a custom table, create a CSV-formatted data file that has the same record format as the custom table, and store the file securely in a remote location. |
3 |
Log in as the root user on an auxiliary database station on an active auxiliary database cluster. |
4 |
Open a console window. |
5 |
Navigate to the /opt/nsp/nfmp/auxdb/install/custom-data/bin directory. |
6 |
To create a custom table, enter the following: bash$ ./customdata.bash -password password -createTables definition_file ↵ where definition_file is the table definition XML file created in Step 1 The specified tables are created. |
7 |
If you want to install the static custom data table definitions, enter the following: bash$ ./customdata.bash -password password -createTables definition_file ↵ where definition_file is a predefined static table definition XML file listed in Static custom data tables in NSP The specified tables are created. |
8 |
To import data to a custom table, enter the following: bash$ ./customdata.bash -password password -importData table_name data_file ↵ where data_file is the CSV data file created in Step 2 table_name is the table to which the data is to be imported The data is imported. |
9 |
To list all custom tables, enter the following: bash$ ./customdata.bash -listTables ↵ The tables are listed. |
10 |
To delete all data in a custom table, enter the following: bash$ ./customdata.bash -password password -deleteData custom_data.table_ct ↵ where table is the name of the table from which to delete data The table data is deleted. |
11 |
To delete a custom table, enter the following: bash$ ./customdata.bash -password password -deleteTable custom_data.table_ct ↵ where table is the name of the table to delete The table is deleted. |
12 |
To export the data in a custom table to a file, enter the following: bash$ ./customdata.bash -exportData custom_data.table_ct output_file ↵ where table is the name of the table from which to export data output_file is the name of the file that is to contain the exported data The table data are exported to the file. |
13 |
To export a custom table schema to a file, enter the following: bash$ ./customdata.bash -tableSchema custom_data.table_ct output_file ↵ where table is the name of the table from which to export the schema output_file is the name of the file that is to contain the exported schema The table schema is saved in the file. |
14 |
Close the console window. End of steps |