How do I create and manage custom auxiliary database table attributes in NSP?

Purpose

Use this procedure to do the following in NSP:

  • Add data to a custom table

  • Create a custom table

  • Delete a custom table or data in a custom table

  • Export data or custom table schema to a file

  • Import date to custom table

  • Install a static custom data table

  • List all custom tables

Note: The password value that you specify in the following steps is the password of the samauxdb auxiliary database user.

Steps
 

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.


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.


Log in as the root user on an auxiliary database station on an active auxiliary database cluster.


Open a console window.


Navigate to the /opt/nsp/nfmp/auxdb/install/custom-data/bin directory.


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.


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.


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.


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