Skip to content

Commit

Permalink
[BEAM-7246] Add Google Spanner IO Read on Python SDK (#9606)
Browse files Browse the repository at this point in the history
* added spanne read io onto python sdk

added spanne read io onto python sdk

refactor code

fix docstrings

fix linting issue

fix linting issue

added display data method and its test cases.

fix lint

Update sdks/python/apache_beam/io/gcp/spannerio.py

Co-Authored-By: Udi Meiri <[email protected]>

Update sdks/python/apache_beam/io/gcp/spannerio.py

Co-Authored-By: Udi Meiri <[email protected]>

Update sdks/python/apache_beam/io/gcp/spannerio.py

Co-Authored-By: Udi Meiri <[email protected]>

Update sdks/python/apache_beam/io/gcp/spannerio.py

Co-Authored-By: Udi Meiri <[email protected]>

Update sdks/python/apache_beam/io/gcp/spannerio.py

Co-Authored-By: Udi Meiri <[email protected]>

adds typehints and refactor code

fix pylint

fix import issues

fix type hints

changed the classes to private to prevent users from using the functionality while integration tests are in development.

moved spannerio files to gcp experimental folder

refactor code

add docs

* fix comments and docs

* remove code comments and added some docs

* fix lint

* adds new test case and some code refactoring

* fix lint issues
  • Loading branch information
Shoaib Zafar authored and chamikaramj committed Jan 17, 2020
1 parent e6a8cbd commit 5b6a0ea
Show file tree
Hide file tree
Showing 5 changed files with 942 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sdks/python/apache_beam/internal/gcp/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ def _get_service_credentials():
'https://www.googleapis.com/auth/cloud-platform',
'https://www.googleapis.com/auth/devstorage.full_control',
'https://www.googleapis.com/auth/userinfo.email',
'https://www.googleapis.com/auth/datastore'
'https://www.googleapis.com/auth/datastore',
'https://www.googleapis.com/auth/spanner'
]
try:
credentials = GoogleCredentials.get_application_default()
Expand Down
17 changes: 17 additions & 0 deletions sdks/python/apache_beam/io/gcp/experimental/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You 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.
#
from __future__ import absolute_import
Loading

0 comments on commit 5b6a0ea

Please sign in to comment.