Skip to content
This repository has been archived by the owner on Oct 16, 2023. It is now read-only.

Commit

Permalink
feat: Add request_source field (#175)
Browse files Browse the repository at this point in the history
* feat: Add request_source field and update formatting

PiperOrigin-RevId: 518330942

Source-Link: googleapis/googleapis@184334d

Source-Link: https://github.com/googleapis/googleapis-gen/commit/1e999b9e556884c94ee2fb4110aa3087d0dc96b5
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMWU5OTliOWU1NTY4ODRjOTRlZTJmYjQxMTBhYTMwODdkMGRjOTZiNSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Mar 22, 2023
1 parent 46cf18b commit d11aa1f
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class MigrationTask(proto.Message):
Translation_Snowflake2BQ, Translation_Netezza2BQ,
Translation_AzureSynapse2BQ, Translation_Vertica2BQ,
Translation_SQLServer2BQ, Translation_Presto2BQ,
Translation_MySQL2BQ.
Translation_MySQL2BQ, Translation_Postgresql2BQ.
state (google.cloud.bigquery_migration_v2.types.MigrationTask.State):
Output only. The current state of the task.
processing_error (google.rpc.error_details_pb2.ErrorInfo):
Expand Down Expand Up @@ -295,13 +295,17 @@ class State(proto.Enum):
scheduled. If it was already assigned,it might
still finish but no new lease renewals will be
granted.
PENDING_DEPENDENCY (6):
The subtask is pending a dependency. It will
be scheduled once its dependencies are done.
"""
STATE_UNSPECIFIED = 0
ACTIVE = 1
RUNNING = 2
SUCCEEDED = 3
FAILED = 4
PAUSED = 5
PENDING_DEPENDENCY = 6

name: str = proto.Field(
proto.STRING,
Expand Down
29 changes: 18 additions & 11 deletions google/cloud/bigquery_migration_v2/types/translation_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,22 @@ class TranslationConfigDetails(proto.Message):
corresponding input files to.
This field is a member of `oneof`_ ``target_location``.
source_dialect (google.cloud.bigquery_migration_v2.types.Dialect):
The dialect of the input files.
target_dialect (google.cloud.bigquery_migration_v2.types.Dialect):
The target dialect for the engine to
translate the input to.
name_mapping_list (google.cloud.bigquery_migration_v2.types.ObjectNameMappingList):
The mapping of objects to their desired
output names in list form.
This field is a member of `oneof`_ ``output_name_mapping``.
source_dialect (google.cloud.bigquery_migration_v2.types.Dialect):
The dialect of the input files.
target_dialect (google.cloud.bigquery_migration_v2.types.Dialect):
The target dialect for the engine to
translate the input to.
source_env (google.cloud.bigquery_migration_v2.types.SourceEnv):
The default source environment values for the
translation.
request_source (str):
The indicator to show translation request
initiator.
"""

gcs_source_path: str = proto.Field(
Expand All @@ -90,6 +93,12 @@ class TranslationConfigDetails(proto.Message):
number=2,
oneof="target_location",
)
name_mapping_list: "ObjectNameMappingList" = proto.Field(
proto.MESSAGE,
number=5,
oneof="output_name_mapping",
message="ObjectNameMappingList",
)
source_dialect: "Dialect" = proto.Field(
proto.MESSAGE,
number=3,
Expand All @@ -100,17 +109,15 @@ class TranslationConfigDetails(proto.Message):
number=4,
message="Dialect",
)
name_mapping_list: "ObjectNameMappingList" = proto.Field(
proto.MESSAGE,
number=5,
oneof="output_name_mapping",
message="ObjectNameMappingList",
)
source_env: "SourceEnv" = proto.Field(
proto.MESSAGE,
number=6,
message="SourceEnv",
)
request_source: str = proto.Field(
proto.STRING,
number=8,
)


class Dialect(proto.Message):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-bigquery-migration",
"version": "0.10.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-bigquery-migration",
"version": "0.10.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down

0 comments on commit d11aa1f

Please sign in to comment.