bigquery-data

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Usage

使用方法

All scripts can be executed using Node.js. Replace
<param_name>
and
<param_value>
with actual values.
Bash:
node <skill_dir>/scripts/<script_name>.js '{"<param_name>": "<param_value>"}'
PowerShell:
node <skill_dir>/scripts/<script_name>.js '{\"<param_name>\": \"<param_value>\"}'
Note: The scripts automatically load the environment variables from various .env files. Do not ask the user to set vars unless skill executions fails due to env var absence.
所有脚本均可通过Node.js执行。将
<param_name>
<param_value>
替换为实际值。
Bash:
node <skill_dir>/scripts/<script_name>.js '{"<param_name>": "<param_value>"}'
PowerShell:
node <skill_dir>/scripts/<script_name>.js '{\"<param_name>\": \"<param_value>\"}'
注意:脚本会自动从多个.env文件加载环境变量。除非因缺少环境变量导致技能执行失败,否则无需要求用户设置变量。

Scripts

脚本

execute_sql

execute_sql

Use this skill to execute sql statement.
使用此技能执行SQL语句。

Parameters

参数

NameTypeDescriptionRequiredDefault
sqlstringThe SQL to execute.Yes
dry_runbooleanIf set to true, the query will be validated and information about the execution will be returned without running the query. Defaults to false.No
false

名称类型描述是否必填默认值
sqlstring要执行的SQL语句
dry_runboolean如果设为true,将验证查询并返回执行相关信息,但不会实际运行查询。默认值为false。
false

get_dataset_info

get_dataset_info

Use this skill to get dataset metadata.
使用此技能获取数据集元数据。

Parameters

参数

NameTypeDescriptionRequiredDefault
projectstringThe Google Cloud project ID containing the dataset.No
datasetstringThe dataset to get metadata information. Can be in
project.dataset
format.
Yes

名称类型描述是否必填默认值
projectstring包含该数据集的Google Cloud项目ID
datasetstring要获取元数据的数据集,格式可为
project.dataset

get_table_info

get_table_info

Use this skill to get table metadata.
使用此技能获取表元数据。

Parameters

参数

NameTypeDescriptionRequiredDefault
projectstringThe Google Cloud project ID containing the dataset and table.No
datasetstringThe table's parent dataset.Yes
tablestringThe table to get metadata information.Yes

名称类型描述是否必填默认值
projectstring包含数据集和表的Google Cloud项目ID
datasetstring表所属的父数据集
tablestring要获取元数据的表

list_dataset_ids

list_dataset_ids

Use this skill to list datasets.
使用此技能列出数据集。

Parameters

参数

NameTypeDescriptionRequiredDefault
projectstringThe Google Cloud project to list dataset ids.No

名称类型描述是否必填默认值
projectstring要列出数据集ID的Google Cloud项目

list_table_ids

list_table_ids

Use this skill to list tables.
使用此技能列出表。

Parameters

参数

NameTypeDescriptionRequiredDefault
projectstringThe Google Cloud project ID containing the dataset.No
datasetstringThe dataset to list table ids.Yes

名称类型描述是否必填默认值
projectstring包含该数据集的Google Cloud项目ID
datasetstring要列出表ID的数据集

search_catalog

search_catalog

Use this skill to find tables, views, models, routines or connections.
使用此技能查找表、视图、模型、例程或连接。

Parameters

参数

NameTypeDescriptionRequiredDefault
promptstringPrompt representing search intention. Do not rewrite the prompt.Yes
datasetIdsarrayArray of dataset IDs.No
[]
projectIdsarrayArray of project IDs.No
[]
typesarrayArray of data types to filter by.No
[]
pageSizeintegerNumber of results in the search page.No
5

名称类型描述是否必填默认值
promptstring代表搜索意图的提示词,请勿改写该提示词
datasetIdsarray数据集ID数组
[]
projectIdsarray项目ID数组
[]
typesarray用于过滤的数据类型数组
[]
pageSizeinteger搜索结果每页的数量
5