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

Commit 533d1d8

Browse files
feat(v2alpha): Add SQL translation service (#170)
* feat: Add SQL translation service to Bazel generation PiperOrigin-RevId: 512937316 Source-Link: googleapis/googleapis@178674c Source-Link: https://github.com/googleapis/googleapis-gen/commit/131f3271256e0a7a2ab96d42540ef05c9cacec7d Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTMxZjMyNzEyNTZlMGE3YTJhYjk2ZDQyNTQwZWYwNWM5Y2FjZWM3ZCJ9 * 🦉 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>
1 parent 5a13387 commit 533d1d8

18 files changed

+3882
-0
lines changed

docs/bigquery_migration_v2alpha/services.rst

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ Services for Google Cloud Bigquery Migration v2alpha API
44
:maxdepth: 2
55

66
migration_service
7+
sql_translation_service
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
SqlTranslationService
2+
---------------------------------------
3+
4+
.. automodule:: google.cloud.bigquery_migration_v2alpha.services.sql_translation_service
5+
:members:
6+
:inherited-members:

google/cloud/bigquery_migration_v2alpha/__init__.py

+18
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
MigrationServiceAsyncClient,
2323
MigrationServiceClient,
2424
)
25+
from .services.sql_translation_service import (
26+
SqlTranslationServiceAsyncClient,
27+
SqlTranslationServiceClient,
28+
)
2529
from .types.assessment_task import (
2630
AssessmentOrchestrationResultDetails,
2731
AssessmentTaskDetails,
@@ -49,6 +53,13 @@
4953
ListMigrationWorkflowsResponse,
5054
StartMigrationWorkflowRequest,
5155
)
56+
from .types.translation_service import (
57+
SqlTranslationError,
58+
SqlTranslationErrorDetail,
59+
SqlTranslationWarning,
60+
TranslateQueryRequest,
61+
TranslateQueryResponse,
62+
)
5263
from .types.translation_task import (
5364
BteqOptions,
5465
DatasetReference,
@@ -61,6 +72,7 @@
6172

6273
__all__ = (
6374
"MigrationServiceAsyncClient",
75+
"SqlTranslationServiceAsyncClient",
6476
"AssessmentOrchestrationResultDetails",
6577
"AssessmentTaskDetails",
6678
"BteqOptions",
@@ -84,10 +96,16 @@
8496
"MigrationWorkflow",
8597
"Point",
8698
"ResourceErrorDetail",
99+
"SqlTranslationError",
100+
"SqlTranslationErrorDetail",
101+
"SqlTranslationServiceClient",
102+
"SqlTranslationWarning",
87103
"StartMigrationWorkflowRequest",
88104
"TeradataOptions",
89105
"TimeInterval",
90106
"TimeSeries",
107+
"TranslateQueryRequest",
108+
"TranslateQueryResponse",
91109
"TranslationFileMapping",
92110
"TranslationTaskDetails",
93111
"TypedValue",

google/cloud/bigquery_migration_v2alpha/gapic_metadata.json

+24
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,30 @@
8888
}
8989
}
9090
}
91+
},
92+
"SqlTranslationService": {
93+
"clients": {
94+
"grpc": {
95+
"libraryClient": "SqlTranslationServiceClient",
96+
"rpcs": {
97+
"TranslateQuery": {
98+
"methods": [
99+
"translate_query"
100+
]
101+
}
102+
}
103+
},
104+
"grpc-async": {
105+
"libraryClient": "SqlTranslationServiceAsyncClient",
106+
"rpcs": {
107+
"TranslateQuery": {
108+
"methods": [
109+
"translate_query"
110+
]
111+
}
112+
}
113+
}
114+
}
91115
}
92116
}
93117
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
from .async_client import SqlTranslationServiceAsyncClient
17+
from .client import SqlTranslationServiceClient
18+
19+
__all__ = (
20+
"SqlTranslationServiceClient",
21+
"SqlTranslationServiceAsyncClient",
22+
)

0 commit comments

Comments
 (0)