spanner-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 tool to execute DML SQL. Please use the googlesql interface for Spanner.
使用此工具执行DML SQL。对于Spanner,请使用googlesql接口。

Parameters

参数

NameTypeDescriptionRequiredDefault
sqlstringThe sql to execute.Yes

名称类型描述是否必填默认值
sqlstring要执行的SQL语句。

execute_sql_dql

execute_sql_dql

Use this tool to execute DQL SQL. Please use the googlesql interface for Spanner.
使用此工具执行DQL SQL。对于Spanner,请使用googlesql接口。

Parameters

参数

NameTypeDescriptionRequiredDefault
sqlstringThe sql to execute.Yes

名称类型描述是否必填默认值
sqlstring要执行的SQL语句。

list_graphs

list_graphs

Lists detailed graph schema information (node tables, edge tables, labels and property declarations) as JSON for user-created graphs. Filters by a comma-separated list of graph names. If names are omitted, lists all graphs. The output can be 'simple' (graph names only) or 'detailed' (full schema).
列出用户创建的图的详细模式信息(节点表、边表、标签和属性声明),以JSON格式返回。可通过逗号分隔的图名称列表进行筛选。如果省略名称,则列出所有图。输出格式可以是'simple'(仅图名称)或'detailed'(完整模式)。

Parameters

参数

NameTypeDescriptionRequiredDefault
graph_namesstringOptional: A comma-separated list of graph names. If empty, details for all graphs in user-accessible schemas will be listed.No``
output_formatstringOptional: Use 'simple' to return graph names only or use 'detailed' to return the full information schema.No
detailed

名称类型描述是否必填默认值
graph_namesstring可选:逗号分隔的图名称列表。如果为空,将列出用户可访问模式中的所有图的详细信息。``
output_formatstring可选:使用'simple'仅返回图名称,或使用'detailed'返回完整的信息模式。
detailed

list_tables

list_tables

Lists detailed schema information (object type, columns, constraints, indexes) as JSON for user-created tables (ordinary or partitioned). Filters by a comma-separated list of names. If names are omitted, lists all tables in user schemas. The output can be 'simple' (table names only) or 'detailed' (full schema).
列出用户创建的表(普通表或分区表)的详细模式信息(对象类型、列、约束、索引),以JSON格式返回。可通过逗号分隔的表名称列表进行筛选。如果省略名称,则列出用户模式中的所有表。输出格式可以是'simple'(仅表名称)或'detailed'(完整模式)。

Parameters

参数

NameTypeDescriptionRequiredDefault
table_namesstringOptional: A comma-separated list of table names. If empty, details for all tables in user-accessible schemas will be listed.No``
output_formatstringOptional: Use 'simple' to return table names only or use 'detailed' to return the full information schema.No
detailed

名称类型描述是否必填默认值
table_namesstring可选:逗号分隔的表名称列表。如果为空,将列出用户可访问模式中的所有表的详细信息。``
output_formatstring可选:使用'simple'仅返回表名称,或使用'detailed'返回完整的信息模式。
detailed