-
Notifications
You must be signed in to change notification settings - Fork 2.2k
/
migration_entities.proto
238 lines (190 loc) · 8.17 KB
/
migration_entities.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
// Copyright 2023 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";
import "google/api/resource.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";
import "google/protobuf/timestamp.proto";
import "google/rpc/error_details.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 = "MigrationEntitiesProto";
option java_package = "com.google.cloud.bigquery.migration.v2";
option php_namespace = "Google\\Cloud\\BigQuery\\Migration\\V2";
// A migration workflow which specifies what needs to be done for an EDW
// migration.
message MigrationWorkflow {
option (google.api.resource) = {
type: "bigquerymigration.googleapis.com/MigrationWorkflow"
pattern: "projects/{project}/locations/{location}/workflows/{workflow}"
};
// Possible migration workflow states.
enum State {
// Workflow state is unspecified.
STATE_UNSPECIFIED = 0;
// Workflow is in draft status, i.e. tasks are not yet eligible for
// execution.
DRAFT = 1;
// Workflow is running (i.e. tasks are eligible for execution).
RUNNING = 2;
// Workflow is paused. Tasks currently in progress may continue, but no
// further tasks will be scheduled.
PAUSED = 3;
// Workflow is complete. There should not be any task in a non-terminal
// state, but if they are (e.g. forced termination), they will not be
// scheduled.
COMPLETED = 4;
}
// Output only. Immutable. The unique identifier for the migration workflow.
// The ID is server-generated.
//
// Example: `projects/123/locations/us/workflows/345`
string name = 1 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.field_behavior) = IMMUTABLE
];
// The display name of the workflow. This can be set to give a workflow
// a descriptive name. There is no guarantee or enforcement of uniqueness.
string display_name = 6;
// The tasks in a workflow in a named map. The name (i.e. key) has no
// meaning and is merely a convenient way to address a specific task
// in a workflow.
map<string, MigrationTask> tasks = 2;
// 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;
// Time when the workflow was last updated.
google.protobuf.Timestamp last_update_time = 5;
}
// A single task for a migration which has details about the configuration of
// the task.
message MigrationTask {
// Possible states of a migration task.
enum State {
// The state is unspecified.
STATE_UNSPECIFIED = 0;
// The task is waiting for orchestration.
PENDING = 1;
// The task is assigned to an orchestrator.
ORCHESTRATING = 2;
// 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
// will be scheduled.
PAUSED = 4;
// The task finished successfully.
SUCCEEDED = 5;
// The task finished unsuccessfully.
FAILED = 6;
}
// The details of the task.
oneof task_details {
// Task configuration for Batch SQL Translation.
TranslationConfigDetails translation_config_details = 14;
}
// Output only. Immutable. The unique identifier for the migration task. The
// ID is server-generated.
string id = 1 [
(google.api.field_behavior) = OUTPUT_ONLY,
(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.
string type = 2;
// Output only. The current state of the task.
State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. An explanation that may be populated when the task is in
// FAILED state.
google.rpc.ErrorInfo processing_error = 5
[(google.api.field_behavior) = OUTPUT_ONLY];
// Time when the task was created.
google.protobuf.Timestamp create_time = 6;
// Time when the task was last updated.
google.protobuf.Timestamp last_update_time = 7;
}
// A subtask for a migration which carries details about the configuration of
// the subtask. The content of the details should not matter to the end user,
// but is a contract between the subtask creator and subtask worker.
message MigrationSubtask {
option (google.api.resource) = {
type: "bigquerymigration.googleapis.com/MigrationSubtask"
pattern: "projects/{project}/locations/{location}/workflows/{workflow}/subtasks/{subtask}"
};
// Possible states of a migration subtask.
enum State {
// The state is unspecified.
STATE_UNSPECIFIED = 0;
// The subtask is ready, i.e. it is ready for execution.
ACTIVE = 1;
// The subtask is running, i.e. it is assigned to a worker for execution.
RUNNING = 2;
// The subtask finished successfully.
SUCCEEDED = 3;
// The subtask finished unsuccessfully.
FAILED = 4;
// The subtask is paused, i.e., it will not be scheduled. If it was already
// assigned,it might still finish but no new lease renewals will be granted.
PAUSED = 5;
// The subtask is pending a dependency. It will be scheduled once its
// dependencies are done.
PENDING_DEPENDENCY = 6;
}
// Output only. Immutable. The resource name for the migration subtask. The ID
// is server-generated.
//
// Example: `projects/123/locations/us/workflows/345/subtasks/678`
string name = 1 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.field_behavior) = IMMUTABLE
];
// The unique ID of the task to which this subtask belongs.
string task_id = 2;
// The type of the Subtask. The migration service does not check whether this
// is a known type. It is up to the task creator (i.e. orchestrator or worker)
// to ensure it only creates subtasks for which there are compatible workers
// polling for Subtasks.
string type = 3;
// Output only. The current state of the subtask.
State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. An explanation that may be populated when the task is in
// FAILED state.
google.rpc.ErrorInfo processing_error = 6
[(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Provides details to errors and issues encountered while
// processing the subtask. Presence of error details does not mean that the
// subtask failed.
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;
// Time when the subtask was created.
google.protobuf.Timestamp create_time = 7;
// Time when the subtask was last updated.
google.protobuf.Timestamp last_update_time = 8;
// The metrics for the subtask.
repeated TimeSeries metrics = 11;
}