Business Insights AI Agent using CDGC Metadata Discovery > Using the Business Insights AI Agent using CDGC Metadata Discovery recipe > Step 3. Configure the database tool connections
  

Step 3. Configure the database tool connections

The Business Insights AI Agent using CDGC Metadata Discovery recipe includes Databricks and Snowflakes Python tools by default to execute your SQL queries. If you want to use a different database, you can configure a new tool and integrate it into the agent flow.

Configure the Databricks Python Tool

  1. 1Open the Databricks_Execute_SQL_Statement tool connection.
  2. 2On the Code tab, enter the following property values in double quotes:
  3. 3Save the connection.

Configure the Snowflake Python Tool

  1. 1Open the Snowflake_Execute_SQL_Statement tool connection.
  2. 2On the Code tab, enter the following property values in double quotes:
  3. 3Save the connection.

Add support for other databases

  1. 1Create a Python tool connection named <Database>_Execute_SQL_Statement, where <Database> is the name of the target system you want to connect to. For example, SQLServer.
  2. 2Add the following description:
  3. Tool that executes SQL statement in <Database> and retrieves the response. Input parameters include the SQL statement, schema, and database.
  4. 3On the Input Parameters tab, add the following parameters of type string:
  5. 4On the Output Parameters tab, add a parameter named results.
  6. 5Implement the code to execute the provided SQL query using the API specific to the database system you want to connect to. Ensure that the tool runs the SQL statement and returns the query results correctly.
  7. 6Save the connection.
  8. 7Connect your new database tool to the SQLGenerationAgent within the AI Agent for Business Insights flow as shown in the following image:
For more information, see Python Code tool in the AI Agent Engineering guide.
This integration lets the agent use your custom tool to execute SQL queries against the new database.