MCP Tools Reference: dataform.googleapis.com

工具:create_release_config

在给定的 Dataform 代码库中创建新的发布配置。

parent 参数值必须采用 projects/{project_id}/locations/{location}/repositories/{repository} 格式。

release_config_id 是用户定义的发布配置 ID。如果用户未指定 ID,请根据其请求生成一个简短的描述性 ID,其中包含小写字母、数字和连字符。

以下示例演示了如何使用 curl 调用 create_release_config MCP 工具。

Curl 请求
                  
curl --location 'https://dataform.googleapis.com/mcp' \
--header 'content-type: application/json' \
--header 'accept: application/json, text/event-stream' \
--data '{
  "method": "tools/call",
  "params": {
    "name": "create_release_config",
    "arguments": {
      // provide these details according to the tool's MCP specification
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'
                

输入架构

CreateReleaseConfig 请求消息。

CreateReleaseConfigRequest

JSON 表示法
{
  "parent": string,
  "releaseConfig": {
    object (ReleaseConfig)
  },
  "releaseConfigId": string
}
字段
parent

string

必需。要在其中创建发布配置的代码库。必须采用 projects/*/locations/*/repositories/* 格式。

releaseConfig

object (ReleaseConfig)

必需。要创建的发布配置。

releaseConfigId

string

必需。要用于发布配置的 ID,该 ID 将成为发布配置资源名称的最后一个组成部分。

ReleaseConfig

JSON 表示法
{
  "name": string,
  "gitCommitish": string,
  "codeCompilationConfig": {
    object (CodeCompilationConfig)
  },
  "cronSchedule": string,
  "timeZone": string,
  "recentScheduledReleaseRecords": [
    {
      object (ScheduledReleaseRecord)
    }
  ],
  "releaseCompilationResult": string,
  "disabled": boolean,

  // Union field _internal_metadata can be only one of the following:
  "internalMetadata": string
  // End of list of possible types for union field _internal_metadata.
}
字段
name

string

标识符。发布版本配置的名称。

gitCommitish

string

必需。应编译代码库的 Git 提交/标记/分支名称。必须存在于远程代码库中。示例:- 提交 SHA:12ade345 - 标记:tag1 - 分支名称:branch1

codeCompilationConfig

object (CodeCompilationConfig)

可选。如果设置了 code_compilation_config,则其字段会替换 dataform.json 中指定的默认编译设置。

cronSchedule

string

可选。用于自动创建编译结果的可选时间表(采用 cron 格式)。

timeZone

string

可选。指定在解读 cron_schedule 时要使用的时区。必须是时区数据库中的时区名称。如果未指定,则默认值为 UTC

recentScheduledReleaseRecords[]

object (ScheduledReleaseRecord)

仅限输出。最近 10 次预定发布尝试的记录,按 release_time 降序排列。每当 cron_schedule 触发自动创建编译结果时,就会更新。

releaseCompilationResult

string

可选。相应发布配置的当前已发布编译结果的名称。当系统根据此发布配置(使用 cron_schedule)自动创建编译结果时,或者当通过 API 调用更新此资源(可能是为了回滚到之前的版本)时,此值会更新。编译结果必须是使用此版本配置创建的。必须采用 projects/*/locations/*/repositories/*/compilationResults/* 格式。

disabled

boolean

可选。停用自动创建编译结果的功能。

联合字段 _internal_metadata

_internal_metadata 只能是下列其中一项:

internalMetadata

string

仅限输出。用于在内部提供资源的所有元数据信息。例如:时间戳、标志、状态字段等。此字段的格式为 JSON 字符串。

CodeCompilationConfig

JSON 表示法
{
  "defaultDatabase": string,
  "defaultSchema": string,
  "defaultLocation": string,
  "assertionSchema": string,
  "vars": {
    string: string,
    ...
  },
  "databaseSuffix": string,
  "schemaSuffix": string,
  "tablePrefix": string,
  "builtinAssertionNamePrefix": string,
  "defaultNotebookRuntimeOptions": {
    object (NotebookRuntimeOptions)
  },
  "pipelineConfig": {
    object (PipelineConfig)
  }
}
字段
defaultDatabase

string

可选。默认数据库(Google Cloud 项目 ID)。

defaultSchema

string

可选。默认架构(BigQuery 数据集 ID)。

defaultLocation

string

可选。要使用的默认 BigQuery 位置。默认值为“US”。如需查看位置的完整列表,请参阅 BigQuery 文档:https://cloud.google.com/bigquery/docs/locations

assertionSchema

string

可选。断言的默认架构(BigQuery 数据集 ID)。

vars

map (key: string, value: string)

可选。在编译期间可供项目代码使用的用户定义变量。

包含一系列 "key": value 对的对象。示例:{ "name": "wrench", "mass": "1.3kg", "count": "3" }

databaseSuffix

string

可选。应附加到所有数据库(Google Cloud 项目 ID)名称的后缀。

schemaSuffix

string

可选。应附加到所有架构(BigQuery 数据集 ID)名称的后缀。

tablePrefix

string

可选。应附加到所有表名称的前缀。

builtinAssertionNamePrefix

string

可选。要附加到内置断言名称的前缀。

defaultNotebookRuntimeOptions

object (NotebookRuntimeOptions)

可选。默认笔记本运行时选项。

pipelineConfig

object (PipelineConfig)

可选。用于定义流水线类型和 Git 代码库中路径的流水线选项。

VarsEntry

JSON 表示法
{
  "key": string,
  "value": string
}
字段
key

string

value

string

NotebookRuntimeOptions

JSON 表示法
{
  "aiPlatformNotebookRuntimeTemplate": string,

  // Union field execution_sink can be only one of the following:
  "gcsOutputBucket": string
  // End of list of possible types for union field execution_sink.

  // Union field repository_snapshot_storage can be only one of the following:
  "gcsRepositorySnapshotDestination": {
    object (GcsRepositorySnapshotDestination)
  }
  // End of list of possible types for union field repository_snapshot_storage.
}
字段
aiPlatformNotebookRuntimeTemplate

string

可选。Colab 运行时模板的资源名称,运行时是从该模板创建的,用于执行笔记本。如果未指定,系统会使用 Colab 的默认规范创建运行时。

联合字段 execution_sink。用于存储笔记本执行结果的位置。execution_sink 只能是下列其中一项:
gcsOutputBucket

string

可选。要将结果上传到的 Google Cloud Storage 位置。格式:gs://bucket-name

联合字段 repository_snapshot_storage。代码库文件快照的目标位置(可在笔记本运行时 repository_snapshot_storage 内以只读方式访问)只能是下列其中一项:
gcsRepositorySnapshotDestination

object (GcsRepositorySnapshotDestination)

可选。要将快照上传到的 Google Cloud Storage 目标位置。对于空 URI,它会默认使用提供的 gcs_output_bucket。格式:gs://bucket-name/path/

GcsRepositorySnapshotDestination

JSON 表示法
{
  "repositorySnapshotUri": string
}
字段
repositorySnapshotUri

string

可选。用于上传代码库快照的 Google Cloud Storage 目标位置。格式:gs://bucket-name/path/

PipelineConfig

JSON 表示法
{
  "pipelineType": enum (PipelineType),
  "path": string
}
字段
pipelineType

enum (PipelineType)

必需。流水线的类型。

path

string

必需。Git 代码库中定义流水线的相对路径。例如,对于 Dataform 流水线,它是 workflow_settings.yamldataform.json 所在的文件夹的路径。

ScheduledReleaseRecord

JSON 表示法
{
  "releaseTime": string,

  // Union field result can be only one of the following:
  "compilationResult": string,
  "errorStatus": {
    object (Status)
  }
  // End of list of possible types for union field result.
}
字段
releaseTime

string (Timestamp format)

仅限输出。相应发布尝试的时间戳。

采用 RFC 3339 标准,生成的输出将始终进行 Z 规范化(即转换为 UTC 零时区格式并在末尾附加 Z),并使用 0、3、6 或 9 个小数位。不带“Z”的偏差时间也是可以接受的。示例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

联合字段 result。相应发布尝试的结果。result 只能是下列其中一项:
compilationResult

string

已创建的编译结果的名称(如果已成功创建)。必须采用 projects/*/locations/*/repositories/*/compilationResults/* 格式。

errorStatus

object (Status)

尝试创建编译结果时遇到的错误状态(如果尝试失败)。

状态

JSON 表示法
{
  "code": integer,
  "message": string,
  "details": [
    {
      "@type": string,
      field1: ...,
      ...
    }
  ]
}
字段
code

integer

状态代码,应为 google.rpc.Code 的枚举值。

message

string

面向开发者的错误消息(应采用英语)。任何向用户显示的错误消息都应进行本地化并通过 google.rpc.Status.details 字段发送,或者由客户端进行本地化。

details[]

object

包含错误详细信息的消息列表。有一组通用的消息类型可供 API 使用。

可以包含任意类型字段的对象。附加字段 "@type" 包含用于标示相应类型的 URI。示例:{ "id": 1234, "@type": "types.example.com/standard/id" }

不限

JSON 表示法
{
  "typeUrl": string,
  "value": string
}
字段
typeUrl

string

通过 URI 引用(由以斜杠结尾的前缀和完全限定的类型名称组成)标识序列化 Protobuf 消息的类型。

示例:type.googleapis.com/google.protobuf.StringValue

此字符串必须包含至少一个 / 字符,并且最后一个 / 后面的内容必须是规范形式的完全限定名,不含前导点。请勿在这些 URI 引用中写入方案,以免客户端尝试联系它们。

前缀是任意的,Protobuf 实现应仅剥离最后一个 / 之前(包括最后一个 /)的所有内容,以识别类型。type.googleapis.com/ 是某些旧版实现所需的常见默认前缀。此前缀并不表示类型的来源,包含该前缀的 URI 不应响应任何请求。

所有类型网址字符串都必须是合法的 URI 引用,并且(对于文本格式)还必须满足以下额外限制:引用的内容只能包含字母数字字符、百分号编码的转义字符以及以下集合中的字符(不包括外侧的反引号):/-.~_!$&()*+,;=。尽管我们允许使用百分比编码,但实现不应对其进行转义,以免与现有解析器混淆。例如,应拒绝 type.googleapis.com%2FFoo

Any 的原始设计中,曾考虑过在这些类型网址上启动类型解析服务的可能性,但 Protobuf 从未实现过此类服务,并且认为联系这些网址存在问题,可能会导致安全问题。不尝试联系人类型网址。

value

string (bytes format)

包含由 type_url 描述的类型的 Protobuf 序列化。

使用 base64 编码的字符串。

时间戳

JSON 表示法
{
  "seconds": string,
  "nanos": integer
}
字段
seconds

string (int64 format)

表示世界协调时间 (UTC) 的秒数(从 Unix 纪元 1970-01-01T00:00:00Z 开始算起)。必须介于 -62135596800 到 253402300799 之间(含边界值),对应于 0001-01-01T00:00:00Z 到 9999-12-31T23:59:59Z。

nanos

integer

秒数的非负小数部分(以纳秒为单位)。此字段是时长的纳秒部分,而不是秒的替代项。对于含小数部分的负秒数,仍必须包含按时间递升的非负纳秒值。必须在 0 到 999,999,999 之间(含边界值)。

PipelineType

流水线的类型。未来可能会延长。如果为 UNSPECIFIED,则会抛出错误。

枚举
PIPELINE_TYPE_UNSPECIFIED 默认值。此值未使用。
DATAFORM 常规 Dataform 流水线。
SQL SQL 单个文件资产。
NOTEBOOK 笔记本单一文件资产。

输出架构

表示 Dataform 发布配置。

ReleaseConfig

JSON 表示法
{
  "name": string,
  "gitCommitish": string,
  "codeCompilationConfig": {
    object (CodeCompilationConfig)
  },
  "cronSchedule": string,
  "timeZone": string,
  "recentScheduledReleaseRecords": [
    {
      object (ScheduledReleaseRecord)
    }
  ],
  "releaseCompilationResult": string,
  "disabled": boolean,

  // Union field _internal_metadata can be only one of the following:
  "internalMetadata": string
  // End of list of possible types for union field _internal_metadata.
}
字段
name

string

标识符。发布版本配置的名称。

gitCommitish

string

必需。应编译代码库的 Git 提交/标记/分支名称。必须存在于远程代码库中。示例:- 提交 SHA:12ade345 - 标记:tag1 - 分支名称:branch1

codeCompilationConfig

object (CodeCompilationConfig)

可选。如果设置了 code_compilation_config,则其字段会替换 dataform.json 中指定的默认编译设置。

cronSchedule

string

可选。用于自动创建编译结果的可选时间表(采用 cron 格式)。

timeZone

string

可选。指定在解读 cron_schedule 时要使用的时区。必须是时区数据库中的时区名称。如果未指定,则默认值为 UTC

recentScheduledReleaseRecords[]

object (ScheduledReleaseRecord)

仅限输出。最近 10 次预定发布尝试的记录,按 release_time 降序排列。每当 cron_schedule 触发自动创建编译结果时,就会更新。

releaseCompilationResult

string

可选。相应发布配置的当前已发布编译结果的名称。当系统根据此发布配置(使用 cron_schedule)自动创建编译结果时,或者当通过 API 调用更新此资源(可能是为了回滚到之前的版本)时,此值会更新。编译结果必须是使用此版本配置创建的。必须采用 projects/*/locations/*/repositories/*/compilationResults/* 格式。

disabled

boolean

可选。停用自动创建编译结果的功能。

联合字段 _internal_metadata

_internal_metadata 只能是下列其中一项:

internalMetadata

string

仅限输出。用于在内部提供资源的所有元数据信息。例如:时间戳、标志、状态字段等。此字段的格式为 JSON 字符串。

CodeCompilationConfig

JSON 表示法
{
  "defaultDatabase": string,
  "defaultSchema": string,
  "defaultLocation": string,
  "assertionSchema": string,
  "vars": {
    string: string,
    ...
  },
  "databaseSuffix": string,
  "schemaSuffix": string,
  "tablePrefix": string,
  "builtinAssertionNamePrefix": string,
  "defaultNotebookRuntimeOptions": {
    object (NotebookRuntimeOptions)
  },
  "pipelineConfig": {
    object (PipelineConfig)
  }
}
字段
defaultDatabase

string

可选。默认数据库(Google Cloud 项目 ID)。

defaultSchema

string

可选。默认架构(BigQuery 数据集 ID)。

defaultLocation

string

可选。要使用的默认 BigQuery 位置。默认值为“US”。如需查看位置的完整列表,请参阅 BigQuery 文档:https://cloud.google.com/bigquery/docs/locations

assertionSchema

string

可选。断言的默认架构(BigQuery 数据集 ID)。

vars

map (key: string, value: string)

可选。在编译期间可供项目代码使用的用户定义变量。

包含一系列 "key": value 对的对象。示例:{ "name": "wrench", "mass": "1.3kg", "count": "3" }

databaseSuffix

string

可选。应附加到所有数据库(Google Cloud 项目 ID)名称的后缀。

schemaSuffix

string

可选。应附加到所有架构(BigQuery 数据集 ID)名称的后缀。

tablePrefix

string

可选。应附加到所有表名称的前缀。

builtinAssertionNamePrefix

string

可选。要附加到内置断言名称的前缀。

defaultNotebookRuntimeOptions

object (NotebookRuntimeOptions)

可选。默认笔记本运行时选项。

pipelineConfig

object (PipelineConfig)

可选。用于定义流水线类型和 Git 代码库中路径的流水线选项。

VarsEntry

JSON 表示法
{
  "key": string,
  "value": string
}
字段
key

string

value

string

NotebookRuntimeOptions

JSON 表示法
{
  "aiPlatformNotebookRuntimeTemplate": string,

  // Union field execution_sink can be only one of the following:
  "gcsOutputBucket": string
  // End of list of possible types for union field execution_sink.

  // Union field repository_snapshot_storage can be only one of the following:
  "gcsRepositorySnapshotDestination": {
    object (GcsRepositorySnapshotDestination)
  }
  // End of list of possible types for union field repository_snapshot_storage.
}
字段
aiPlatformNotebookRuntimeTemplate

string

可选。Colab 运行时模板的资源名称,运行时是从该模板创建的,用于执行笔记本。如果未指定,系统会使用 Colab 的默认规范创建运行时。

联合字段 execution_sink。用于存储笔记本执行结果的位置。execution_sink 只能是下列其中一项:
gcsOutputBucket

string

可选。要将结果上传到的 Google Cloud Storage 位置。格式:gs://bucket-name

联合字段 repository_snapshot_storage。代码库文件快照的目标位置(可在笔记本运行时 repository_snapshot_storage 内以只读方式访问)只能是下列其中一项:
gcsRepositorySnapshotDestination

object (GcsRepositorySnapshotDestination)

可选。要将快照上传到的 Google Cloud Storage 目标位置。对于空 URI,它会默认使用提供的 gcs_output_bucket。格式:gs://bucket-name/path/

GcsRepositorySnapshotDestination

JSON 表示法
{
  "repositorySnapshotUri": string
}
字段
repositorySnapshotUri

string

可选。用于上传代码库快照的 Google Cloud Storage 目标位置。格式:gs://bucket-name/path/

PipelineConfig

JSON 表示法
{
  "pipelineType": enum (PipelineType),
  "path": string
}
字段
pipelineType

enum (PipelineType)

必需。流水线的类型。

path

string

必需。Git 代码库中定义流水线的相对路径。例如,对于 Dataform 流水线,它是 workflow_settings.yamldataform.json 所在的文件夹的路径。

ScheduledReleaseRecord

JSON 表示法
{
  "releaseTime": string,

  // Union field result can be only one of the following:
  "compilationResult": string,
  "errorStatus": {
    object (Status)
  }
  // End of list of possible types for union field result.
}
字段
releaseTime

string (Timestamp format)

仅限输出。相应发布尝试的时间戳。

采用 RFC 3339 标准,生成的输出将始终进行 Z 规范化(即转换为 UTC 零时区格式并在末尾附加 Z),并使用 0、3、6 或 9 个小数位。不带“Z”的偏差时间也是可以接受的。示例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

联合字段 result。相应发布尝试的结果。result 只能是下列其中一项:
compilationResult

string

已创建的编译结果的名称(如果已成功创建)。必须采用 projects/*/locations/*/repositories/*/compilationResults/* 格式。

errorStatus

object (Status)

尝试创建编译结果时遇到的错误状态(如果尝试失败)。

状态

JSON 表示法
{
  "code": integer,
  "message": string,
  "details": [
    {
      "@type": string,
      field1: ...,
      ...
    }
  ]
}
字段
code

integer

状态代码,应为 google.rpc.Code 的枚举值。

message

string

面向开发者的错误消息(应采用英语)。任何向用户显示的错误消息都应进行本地化并通过 google.rpc.Status.details 字段发送,或者由客户端进行本地化。

details[]

object

包含错误详细信息的消息列表。有一组通用的消息类型可供 API 使用。

可以包含任意类型字段的对象。附加字段 "@type" 包含用于标示相应类型的 URI。示例:{ "id": 1234, "@type": "types.example.com/standard/id" }

不限

JSON 表示法
{
  "typeUrl": string,
  "value": string
}
字段
typeUrl

string

通过 URI 引用(由以斜杠结尾的前缀和完全限定的类型名称组成)标识序列化 Protobuf 消息的类型。

示例:type.googleapis.com/google.protobuf.StringValue

此字符串必须包含至少一个 / 字符,并且最后一个 / 后面的内容必须是规范形式的完全限定名,不含前导点。请勿在这些 URI 引用中写入方案,以免客户端尝试联系它们。

前缀是任意的,Protobuf 实现应仅剥离最后一个 / 之前(包括最后一个 /)的所有内容,以识别类型。type.googleapis.com/ 是某些旧版实现所需的常见默认前缀。此前缀并不表示类型的来源,包含该前缀的 URI 不应响应任何请求。

所有类型网址字符串都必须是合法的 URI 引用,并且(对于文本格式)还必须满足以下额外限制:引用的内容只能包含字母数字字符、百分号编码的转义字符以及以下集合中的字符(不包括外侧的反引号):/-.~_!$&()*+,;=。尽管我们允许使用百分比编码,但实现不应对其进行转义,以免与现有解析器混淆。例如,应拒绝 type.googleapis.com%2FFoo

Any 的原始设计中,曾考虑过在这些类型网址上启动类型解析服务的可能性,但 Protobuf 从未实现过此类服务,并且认为联系这些网址存在问题,可能会导致安全问题。不尝试联系人类型网址。

value

string (bytes format)

包含由 type_url 描述的类型的 Protobuf 序列化。

使用 base64 编码的字符串。

时间戳

JSON 表示法
{
  "seconds": string,
  "nanos": integer
}
字段
seconds

string (int64 format)

表示世界协调时间 (UTC) 的秒数(从 Unix 纪元 1970-01-01T00:00:00Z 开始算起)。必须介于 -62135596800 到 253402300799 之间(含边界值),对应于 0001-01-01T00:00:00Z 到 9999-12-31T23:59:59Z。

nanos

integer

秒数的非负小数部分(以纳秒为单位)。此字段是时长的纳秒部分,而不是秒的替代项。对于含小数部分的负秒数,仍必须包含按时间递升的非负纳秒值。必须在 0 到 999,999,999 之间(含边界值)。

PipelineType

流水线的类型。未来可能会延长。如果为 UNSPECIFIED,则会抛出错误。

枚举
PIPELINE_TYPE_UNSPECIFIED 默认值。此值未使用。
DATAFORM 常规 Dataform 流水线。
SQL SQL 单个文件资产。
NOTEBOOK 笔记本单一文件资产。

工具注释

破坏性提示:❌ | 等幂性提示:❌ | 只读提示:❌ | 开放世界提示:❌