Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.cloud.bigquery.migration.v2;

import "google/api/field_behavior.proto";

option csharp_namespace = "Google.Cloud.BigQuery.Migration.V2";
option go_package = "cloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb";
option java_multiple_files = true;
option java_outer_classname = "AssessmentTaskProto";
option java_package = "com.google.cloud.bigquery.migration.v2";
option php_namespace = "Google\\Cloud\\BigQuery\\Migration\\V2";

// Assessment task config.
message AssessmentTaskDetails {
// Required. The Cloud Storage path for assessment input files.
string input_path = 1 [(google.api.field_behavior) = REQUIRED];

// Required. The BigQuery dataset for output.
string output_dataset = 2 [(google.api.field_behavior) = REQUIRED];

// Optional. An optional Cloud Storage path to write the query logs (which is
// then used as an input path on the translation task)
string querylogs_path = 3 [(google.api.field_behavior) = OPTIONAL];

// Required. The data source or data warehouse type (eg: TERADATA/REDSHIFT)
// from which the input data is extracted.
string data_source = 4 [(google.api.field_behavior) = REQUIRED];

// Optional. A collection of additional feature flags for this assessment.
optional AssessmentFeatureHandle feature_handle = 6
[(google.api.field_behavior) = OPTIONAL];
}

// User-definable feature flags for assessment tasks.
message AssessmentFeatureHandle {
// Optional. Whether to create a dataset containing non-PII data in addition
// to the output dataset.
optional bool add_shareable_dataset = 1
[(google.api.field_behavior) = OPTIONAL];
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2025 Google LLC
// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -18,6 +18,7 @@ package google.cloud.bigquery.migration.v2;

import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/bigquery/migration/v2/assessment_task.proto";
import "google/cloud/bigquery/migration/v2/migration_error_details.proto";
import "google/cloud/bigquery/migration/v2/migration_metrics.proto";
import "google/cloud/bigquery/migration/v2/translation_config.proto";
Expand Down Expand Up @@ -85,11 +86,13 @@ message MigrationWorkflow {
// Output only. That status of the workflow.
State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY];

// Time when the workflow was created.
google.protobuf.Timestamp create_time = 4;
// Output only. Time when the workflow was created.
google.protobuf.Timestamp create_time = 4
[(google.api.field_behavior) = OUTPUT_ONLY];

// Time when the workflow was last updated.
google.protobuf.Timestamp last_update_time = 5;
// Output only. Time when the workflow was last updated.
google.protobuf.Timestamp last_update_time = 5
[(google.api.field_behavior) = OUTPUT_ONLY];
}

// A single task for a migration which has details about the configuration of
Expand All @@ -109,7 +112,7 @@ message MigrationTask {
// The task is running, i.e. its subtasks are ready for execution.
RUNNING = 3;

// Tha task is paused. Assigned subtasks can continue, but no new subtasks
// The task is paused. Assigned subtasks can continue, but no new subtasks
// will be scheduled.
PAUSED = 4;

Expand All @@ -122,6 +125,9 @@ message MigrationTask {

// The details of the task.
oneof task_details {
// Task configuration for Assessment.
AssessmentTaskDetails assessment_task_details = 12;

// Task configuration for CW Batch/Offline SQL Translation.
TranslationConfigDetails translation_config_details = 14;

Expand All @@ -136,13 +142,22 @@ message MigrationTask {
(google.api.field_behavior) = IMMUTABLE
];

// The type of the task. This must be one of the supported task types:
// Translation_Teradata2BQ, Translation_Redshift2BQ, Translation_Bteq2BQ,
// Translation_Oracle2BQ, Translation_HiveQL2BQ, Translation_SparkSQL2BQ,
// Translation_Snowflake2BQ, Translation_Netezza2BQ,
// Translation_AzureSynapse2BQ, Translation_Vertica2BQ,
// Translation_SQLServer2BQ, Translation_Presto2BQ, Translation_MySQL2BQ,
// Translation_Postgresql2BQ, Translation_SQLite2BQ, Translation_Greenplum2BQ.
// The type of the task. This must be one of the supported task types.
//
// Assessment:
//
// - `Assessment_Hive` - Assessment for Hive.
// - `Assessment_Redshift` - Assessment for Redshift.
// - `Assessment_Snowflake` - Assessment for Snowflake.
// - `Assessment_Teradata_v2` - Assessment for Teradata.
// - `Assessment_Oracle` - Assessment for Oracle.
// - `Assessment_Hadoop` - Assessment for Hadoop.
// - `Assessment_Informatica` - Assessment for Informatica.
//
// Translation:
// See [Supported Task
// Types](https://docs.cloud.google.com/bigquery/docs/api-sql-translator#supported_task_types)
// for a list of supported task types.
string type = 2;

// Output only. The current state of the task.
Expand All @@ -153,36 +168,42 @@ message MigrationTask {
google.rpc.ErrorInfo processing_error = 5
[(google.api.field_behavior) = OUTPUT_ONLY];

// Time when the task was created.
google.protobuf.Timestamp create_time = 6;
// Output only. Time when the task was created.
google.protobuf.Timestamp create_time = 6
[(google.api.field_behavior) = OUTPUT_ONLY];

// Time when the task was last updated.
google.protobuf.Timestamp last_update_time = 7;
// Output only. Time when the task was last updated.
google.protobuf.Timestamp last_update_time = 7
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Provides details to errors and issues encountered while
// processing the task. Presence of error details does not mean that the task
// failed.
repeated ResourceErrorDetail resource_error_details = 17
[(google.api.field_behavior) = OUTPUT_ONLY];

// The number or resources with errors. Note: This is not the total
// number of errors as each resource can have more than one error.
// This is used to indicate truncation by having a `resource_error_count`
// that is higher than the size of `resource_error_details`.
int32 resource_error_count = 18;
// Output only. The number or resources with errors. Note: This is not the
// total number of errors as each resource can have more than one error. This
// is used to indicate truncation by having a `resource_error_count` that is
// higher than the size of `resource_error_details`.
int32 resource_error_count = 18 [(google.api.field_behavior) = OUTPUT_ONLY];

// The metrics for the task.
repeated TimeSeries metrics = 19;
// Output only. The metrics for the task.
repeated TimeSeries metrics = 19 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The result of the task.
MigrationTaskResult task_result = 20
[(google.api.field_behavior) = OUTPUT_ONLY];

// Count of all the processing errors in this task and its subtasks.
int32 total_processing_error_count = 21;
// Output only. Count of all the processing errors in this task and its
// subtasks.
int32 total_processing_error_count = 21
[(google.api.field_behavior) = OUTPUT_ONLY];

// Count of all the resource errors in this task and its subtasks.
int32 total_resource_error_count = 22;
// Output only. Count of all the resource errors in this task and its
// subtasks.
int32 total_resource_error_count = 22
[(google.api.field_behavior) = OUTPUT_ONLY];
}

// A subtask for a migration which carries details about the configuration of
Expand Down Expand Up @@ -252,20 +273,22 @@ message MigrationSubtask {
repeated ResourceErrorDetail resource_error_details = 12
[(google.api.field_behavior) = OUTPUT_ONLY];

// The number or resources with errors. Note: This is not the total
// number of errors as each resource can have more than one error.
// This is used to indicate truncation by having a `resource_error_count`
// that is higher than the size of `resource_error_details`.
int32 resource_error_count = 13;
// Output only. The number or resources with errors. Note: This is not the
// total number of errors as each resource can have more than one error. This
// is used to indicate truncation by having a `resource_error_count` that is
// higher than the size of `resource_error_details`.
int32 resource_error_count = 13 [(google.api.field_behavior) = OUTPUT_ONLY];

// Time when the subtask was created.
google.protobuf.Timestamp create_time = 7;
// Output only. Time when the subtask was created.
google.protobuf.Timestamp create_time = 7
[(google.api.field_behavior) = OUTPUT_ONLY];

// Time when the subtask was last updated.
google.protobuf.Timestamp last_update_time = 8;
// Output only. Time when the subtask was last updated.
google.protobuf.Timestamp last_update_time = 8
[(google.api.field_behavior) = OUTPUT_ONLY];

// The metrics for the subtask.
repeated TimeSeries metrics = 11;
// Output only. The metrics for the subtask.
repeated TimeSeries metrics = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// The migration task result.
Expand All @@ -284,4 +307,7 @@ message TranslationTaskResult {

// The records from the aggregate CSV report for a migration workflow.
repeated GcsReportLogMessage report_log_messages = 2;

// The Cloud Console URI for the migration workflow.
string console_uri = 3;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2025 Google LLC
// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2025 Google LLC
// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2025 Google LLC
// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2025 Google LLC
// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2025 Google LLC
// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -47,6 +47,48 @@ message TranslationDetails {
// targets will be generated. Some additional target types may be slower to
// generate. See the documentation for the set of available target types.
repeated string target_types = 5;

// The configuration for the suggestion if requested as a target type.
SuggestionConfig suggestion_config = 6;
}

// The configuration for the suggestion if requested as a target type.
message SuggestionConfig {
// The list of suggestion steps to skip.
repeated SuggestionStep skip_suggestion_steps = 1;
}

// Suggestion step to skip.
message SuggestionStep {
// Suggestion type.
enum SuggestionType {
// Suggestion type unspecified.
SUGGESTION_TYPE_UNSPECIFIED = 0;

// Query customization.
QUERY_CUSTOMIZATION = 1;

// Translation explanation.
TRANSLATION_EXPLANATION = 2;
}

// The target to apply the suggestion to.
enum RewriteTarget {
// Rewrite target unspecified.
REWRITE_TARGET_UNSPECIFIED = 0;

// Source SQL.
SOURCE_SQL = 1;

// Target SQL.
TARGET_SQL = 2;
}

// The type of suggestion.
SuggestionType suggestion_type = 1;

// The rewrite target.
RewriteTarget rewrite_target = 2;
}

// Represents one mapping from a source SQL to a target SQL.
Expand All @@ -67,6 +109,9 @@ message SourceSpec {

// Source literal.
Literal literal = 2;

// The path to a single source file in Cloud Storage.
string gcs_file_path = 4;
}

// Optional. The optional field to specify the encoding of the sql bytes.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2025 Google LLC
// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Loading
Loading