Skip to content

Database Tools

Before using any of the database tools in your automations you first need to configure them in the Connections dialog under Settings.

All the database tools have a parameter called connection_name that must be set to one of the connections you have configured when the AI agent or you run the tool.

Postgres:

  • postgres_info
  • postgres_exec

BigQuery:

  • bigquery_info
  • bigquery_exec

Documentation

postgres_info

Show information related to Postgres databases, schemas, tables, views, columns, and relationships between relations for the connection. There are four kinds of information categories supported.

DATABASES: Lists all available databases for the connection, to identify which databases can potentially be accessed on the server.

TABLES: Enumerates each table and view along with its associated schema and privileges, providing the list of relations in the database.

COLUMNS: Shows the column names, their data types, as well as constraints such as nullability and default values, all organized by the corresponding tables, views, and schemas.

RELATIONSHIPS: Identifies the foreign key relationships that link child tables to their parent tables, detailing which specific columns are involved in these linkages. Each relationship is fully described with the child table and column, the parent table and column, and the constraint name that enforces the connection.

Parameters

connection_name
The name of the connection which contains authentication secrets.

info_category
The kind of database, schema, tables and views, columns or relationships information to gather. Valid values are: Databases, Tables, Columns, or Relationships.

filter
Optional parameter except when using kind COLUMNS, then filter must be a schema name or schema.table name to filter columns by.

output_path
Optional parameter specifying a fully qualified file or folder name where the output is saved: if a filename is provided and it already exists, an error is returned; if a folder is provided, a new file with a .json extension is auto-generated and saved in that folder; an empty string or '-' displays the output directly, with '-' being the recommended default for direct display

postgres_exec

Execute a Postgres query.

Parameters

connection_name
The name of the connection which contains authentication secrets.

query
The query to run in the Postgres database instance associated with the connection_name.

output_path
Optional parameter specifying a fully qualified file or folder name where the output is saved: if a filename is provided and it already exists, an error is returned; if a folder is provided, a new file with a .json extension is auto-generated and saved in that folder; an empty string or '-' displays the output directly, with '-' being the recommended default for direct display

bigquery_info

Show the schemas of the Google BigQuery tables in the dataset of the project.

Parameters

connection_name
The name of the connection which contains authentication secrets.

project_id
The project ID of the dataset.

dataset_id
The dataset ID of the dataset who's schema will be shown.

output_path
Optional parameter specifying a fully qualified file or folder name where the output is saved: if a filename is provided and it already exists, an error is returned; if a folder is provided, a new file with a .json extension is auto-generated and saved in that folder; an empty string or '-' displays the output directly, with '-' being the recommended default for direct display

bigquery_exec

Execute a Google BigQuery query.

Parameters

connection_name
The name of the connection which contains authentication secrets.

project_id
The project ID of the dataset.

query
The query to run in the Google BigQuery instance of the project.

output_path
Optional parameter specifying a fully qualified file or folder name where the output is saved: if a filename is provided and it already exists, an error is returned; if a folder is provided, a new file with a .json extension is auto-generated and saved in that folder; an empty string or '-' displays the output directly, with '-' being the recommended default for direct display

Copyright © 2024-2025 Turingpaper Technologies, Inc.