Back to Genai Toolbox

dataplex-generate-data-insights

docs/en/integrations/knowledge-catalog/tools/knowledge-catalog-generate-data-insights.md

1.5.03.1 KB
Original Source

About

A dataplex-generate-data-insights tool triggers the creation and run of a Dataplex Data Insights scan on a BigQuery table.

Since the scan template creation is asynchronous, this tool returns a Long-Running Operation (LRO) resource name (format: projects/{project}/locations/{location}/operations/{operation_id}). To orchestrate this workflow, you must:

  1. Capture the operation_id from this tool's response.
  2. Poll the dataplex-get-operation tool with this ID until done is true.
  3. Extract the created scan ID (scanId) from the completed operation's response.
  4. Poll dataplex-get-run-status with the scanId until the job state is SUCCEEDED.
  5. Call dataplex-get-data-insights with the scanId to fetch the final results.

Compatible Sources

{{< compatible-sources >}}

Requirements

IAM Permissions

Knowledge Catalog uses Identity and Access Management (IAM) to control user and group access to Knowledge Catalog resources. Toolbox will use your Application Default Credentials (ADC) to authorize and authenticate when interacting with [Knowledge Catalog][dataplex-docs].

In addition to setting the ADC for your server, you need to ensure the IAM identity has been given the correct IAM permissions for the tasks you intend to perform. See Knowledge Catalog IAM permissions and Knowledge Catalog IAM roles for more information on applying IAM permissions and roles to an identity.

Parameters

The dataplex-generate-data-insights tool accepts the following parameters:

fieldtyperequireddescription
resourcePathstringtrueThe resource path of the target BigQuery table (format: projects/{project}/datasets/{dataset}/tables/{table}).
locationstringtrueThe Google Cloud region where the scan should be executed (e.g. us-central1).
publishbooleanfalseIf true, publishes the generated insights directly to the Dataplex Universal Catalog. Defaults to false.

Example

yaml
kind: tool
name: generate_data_insights
type: dataplex-generate-data-insights
source: my-dataplex-source
description: Trigger a new data insights scan.

Reference

fieldtyperequireddescription
typestringtrueMust be "dataplex-generate-data-insights".
sourcestringtrueName of the source the tool should execute on.
descriptionstringtrueDescription of the tool that is passed to the LLM.