You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/06/04 21:50:05 UTC
[GitHub] [beam] damccorm opened a new issue, #21198: Google Spanner dependency is too old; cannot deal with JSON type code
damccorm opened a new issue, #21198:
URL: https://github.com/apache/beam/issues/21198
Apache Beam is using google-cloud-spanner version 1.19.1, while current version of google-cloud-spanner is 3.11.1.
I was attempting to use ReadFromSpanner when I ran into a ValueError - it was getting a type code 11 from Spanner and couldn't parse it.
Here is (some) relevant code from v3.11.1 of Spanner:
```
class TypeCode(proto.Enum):
r"""``TypeCode`` is used as part of [Type][google.spanner.v1.Type]
to
indicate the type of a Cloud Spanner value.
Each legal value of a type can be encoded
to or decoded from a JSON
value, using the encodings described below. All Cloud Spanner values
can be ``null``, regardless of type; ``null``\ s are always encoded
as a JSON ``null``.
"""
TYPE_CODE_UNSPECIFIED = 0
BOOL = 1
INT64 = 2
FLOAT64 = 3
TIMESTAMP
= 4
DATE = 5
STRING = 6
BYTES = 7
ARRAY = 8
STRUCT = 9
NUMERIC
= 10
JSON = 11
```
and the same from v1.19.1:
```
_sym_db.RegisterEnumDescriptor(_TYPECODE)
TypeCode = enum_type_wrapper.EnumTypeWrapper(_TYPECODE)
TYPE_CODE_UNSPECIFIED
= 0
BOOL = 1
INT64 = 2
FLOAT64 = 3T
IMESTAMP = 4
DATE = 5
STRING = 6
BYTES = 7
ARRAY = 8
STRUCT
= 9
NUMERIC = 10
```
There is no support for type code 11, aka JSON in Apache Beam right now.
Imported from Jira [BEAM-13270](https://issues.apache.org/jira/browse/BEAM-13270). Original Jira may contain additional context.
Reported by: LauraFP.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] tvalentyn closed issue #21198: Google Spanner dependency is too old; cannot deal with JSON type code
Posted by GitBox <gi...@apache.org>.
tvalentyn closed issue #21198: Google Spanner dependency is too old; cannot deal with JSON type code
URL: https://github.com/apache/beam/issues/21198
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] Abacn commented on issue #21198: Google Spanner dependency is too old; cannot deal with JSON type code
Posted by GitBox <gi...@apache.org>.
Abacn commented on issue #21198:
URL: https://github.com/apache/beam/issues/21198#issuecomment-1163552891
The native spannerio implementation in python sdk has not been actively maintained. May use cross-language transform `apache_beam.io.spanner`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org