Creating and managing SQL DI connections, objects, and models with the shell CLI
After successful installation and configuration, connect your SQL Data Insights (SQL DI) application to your Db2 system or data sharing group, create AI objects, enable the objects for AI query, and if needed, retrain and deploy object models. You can create and manage the connections, objects, and object models by using the SQL DI shell CLI.
Procedure
- Create the required credentials files to encrypt and store the user IDs and passwords that you will use to access SQL DI and connect to Db2.
See Creating and encrypting a credentials file with SQL DI shell CLI for instructions.
- Create the input files required for the commands that you will issue to create and manage your SQL DI connections, AI objects, and object models. See Creating and encrypting a credentials file with SQL DI shell CLI for instructions.
- In a bash session, change to the $SQLDI_INSTALL_DIR/sql-data-insights/bin directory.
- Create, list, update, or remove a connection by invoking the sqldi.sh shell script with a corresponding command.
Assume that you created input file
sqldi_connection_input
for the shell commands for creating and managing connections.- To create a connection, issue the following command with the
-f
option:./sqldi.sh create_connection -f
sqldi_connection_input
- To modify a connection, issue the following command with the
-f
option:./sqldi.sh update_connection -f
sqldi_connection_input
- To delete a connection, issue the following command with the
-f
option:./sqldi.sh remove_connection -f
sqldi_connection_input
- To list all connections to a Db2 server, issue the following command with the
-f
option:./sqldi.sh list_connections -f
sqldi_connection_input
See Shell commands for SQL Data Insights configuration, administration, and object model management for details about the commands.
- To create a connection, issue the following command with the
- Create, list, view, or remove an AI object by invoking the sqldi.sh shell script with a corresponding command.
Assume that you created input file
sqldi_object_model_input
for the shell commands for creating and managing AI objects.- To create an AI object and enable it for AI query, issue the following command with the
-f
option:./sqldi.sh create_object -f
sqldi_object_model_input
- To view the enablement status and other details of an object, issue the following command with the
-f
option:./sqldi.sh list_object -f
sqldi_object_model_input
-status_rc-status_rc
is optional. When specified, the response of the command includes the AI query enablement status of the object. - To list all objects associated with a specific connection, issue the following command with the
-f
option:./sqldi.sh list_all_objects -f
sqldi_object_model_input
- To remove an AI object, issue the following command with the
-f
option:./sqldi.sh remove_object -f
sqldi_object_model_input
- To view the column configuration of a specific object, issue the following command with the
-f
option:./sqldi.sh list_column_config -f
sqldi_object_model_input
-o <column_config_file>The
-o
option specifies that you also want to save the retrieved column configuration output to the column_config_file file.
See Shell commands for SQL Data Insights configuration, administration, and object model management for details about the commands.
- To create an AI object and enable it for AI query, issue the following command with the
- If needed, retrain, deploy, or remove an object model by invoking the sqldi.sh shell script with a corresponding command.
You also use input file
sqldi_object_model_input
for the shell commands to create and manage object models.- To retrain an object model, issue the following command with the
-f
option:./sqldi.sh retrain -f
sqldi_object_model_input
- To deploy a retrained model, issue the following command with the
-f
option:./sqldi.sh deploy -f
sqldi_object_model_input
- To delete a retrained model, issue the following command with the
-f
option:./sqldi.sh remove_model -f
sqldi_object_model_input
See Shell commands for SQL Data Insights configuration, administration, and object model management for details about the commands.
- To retrain an object model, issue the following command with the