-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
enhancementNew feature or requestNew feature or request
Description
splanter seems to support all Cloud Spanner table column types except ARRAY types.
Ideally, ARRAY types should be supported.
Schama
CREATE TABLE AllTypes (
ID STRING(MAX) NOT NULL,
BoolValue BOOL,
Int64Value INT64,
Float64Value FLOAT64,
TimestampValue TIMESTAMP,
DateValue DATE,
StringValue STRING(MAX),
BytesValue BYTES(MAX),
NumericValue NUMERIC,
JSONValue JSON,
StringArray ARRAY<STRING(MAX)>,
) PRIMARY KEY(ID);
YAML
---
# Values are need to be encoded as documented.
# https://cloud.google.com/spanner/docs/reference/rpc/google.spanner.v1#google.spanner.v1.TypeCode
- ID: "All_Type_Values"
BoolValue: true
BytesValue: "aG9nZQ==" # base64("hoge")
DateValue: "2022-04-01"
Float64Value: 3.14159
Int64Value: 42
JSONValue: '{"test": 1}'
NumericValue: "-12345678901234567890123456789.123456789"
StringValue: "FooBar"
TimestampValue: "2022-04-01T00:00:00Z"
# failed to load data to spanner tables: failed to insert records: spanner: code = "InvalidArgument", desc = "client doesn't support type []interface {}"exit status 1
# StringArray:
# - "Foo"
# - "Bar"
In this case, it seems to need []interface{}-to-[]string conversion(using INFORMATION_SCHEMA or use reflection?). ARRAY<INT64>, ARRAY<TIMESTAMP>, etc are also should be supported
110y, hokuts and uji
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request