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

Commit

Permalink
feat(v2): Add MySQL dialect (#116)
Browse files Browse the repository at this point in the history
* feat: Add MySQL dialect to bigquerymigration v2 client library

PiperOrigin-RevId: 466417698

Source-Link: googleapis/googleapis@2bafaf1

Source-Link: https://github.com/googleapis/googleapis-gen/commit/15db99606c2f37840475be9dfa5faa32d0844dbf
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTVkYjk5NjA2YzJmMzc4NDA0NzViZTlkZmE1ZmFhMzJkMDg0NGRiZiJ9

* 🦉 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 Aug 10, 2022
1 parent d05fa32 commit 9f66ca4
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 1 deletion.
Empty file.
2 changes: 2 additions & 0 deletions google/cloud/bigquery_migration/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
BigQueryDialect,
Dialect,
HiveQLDialect,
MySQLDialect,
NameMappingKey,
NameMappingValue,
NetezzaDialect,
Expand Down Expand Up @@ -96,6 +97,7 @@
"BigQueryDialect",
"Dialect",
"HiveQLDialect",
"MySQLDialect",
"NameMappingKey",
"NameMappingValue",
"NetezzaDialect",
Expand Down
2 changes: 2 additions & 0 deletions google/cloud/bigquery_migration_v2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
BigQueryDialect,
Dialect,
HiveQLDialect,
MySQLDialect,
NameMappingKey,
NameMappingValue,
NetezzaDialect,
Expand Down Expand Up @@ -79,6 +80,7 @@
"MigrationSubtask",
"MigrationTask",
"MigrationWorkflow",
"MySQLDialect",
"NameMappingKey",
"NameMappingValue",
"NetezzaDialect",
Expand Down
2 changes: 2 additions & 0 deletions google/cloud/bigquery_migration_v2/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
BigQueryDialect,
Dialect,
HiveQLDialect,
MySQLDialect,
NameMappingKey,
NameMappingValue,
NetezzaDialect,
Expand Down Expand Up @@ -74,6 +75,7 @@
"BigQueryDialect",
"Dialect",
"HiveQLDialect",
"MySQLDialect",
"NameMappingKey",
"NameMappingValue",
"NetezzaDialect",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ class MigrationTask(proto.Message):
Translation_HiveQL2BQ, Translation_SparkSQL2BQ,
Translation_Snowflake2BQ, Translation_Netezza2BQ,
Translation_AzureSynapse2BQ, Translation_Vertica2BQ,
Translation_SQLServer2BQ, Translation_Presto2BQ.
Translation_SQLServer2BQ, Translation_Presto2BQ,
Translation_MySQL2BQ.
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
15 changes: 15 additions & 0 deletions google/cloud/bigquery_migration_v2/types/translation_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"SQLServerDialect",
"PostgresqlDialect",
"PrestoDialect",
"MySQLDialect",
"ObjectNameMappingList",
"ObjectNameMapping",
"NameMappingKey",
Expand Down Expand Up @@ -170,6 +171,10 @@ class Dialect(proto.Message):
presto_dialect (google.cloud.bigquery_migration_v2.types.PrestoDialect):
The Presto dialect
This field is a member of `oneof`_ ``dialect_value``.
mysql_dialect (google.cloud.bigquery_migration_v2.types.MySQLDialect):
The MySQL dialect
This field is a member of `oneof`_ ``dialect_value``.
"""

Expand Down Expand Up @@ -251,6 +256,12 @@ class Dialect(proto.Message):
oneof="dialect_value",
message="PrestoDialect",
)
mysql_dialect = proto.Field(
proto.MESSAGE,
number=14,
oneof="dialect_value",
message="MySQLDialect",
)


class BigQueryDialect(proto.Message):
Expand Down Expand Up @@ -323,6 +334,10 @@ class PrestoDialect(proto.Message):
r"""The dialect definition for Presto."""


class MySQLDialect(proto.Message):
r"""The dialect definition for MySQL."""


class ObjectNameMappingList(proto.Message):
r"""Represents a map of name mappings using a list of key:value
proto messages of existing name to desired output name.
Expand Down

0 comments on commit 9f66ca4

Please sign in to comment.