Questions tagged [google-cloud-spanner]

Google Cloud Spanner is a relational, highly scalable, managed, database service. Cloud Spanner solves the need for a horizontally-scaling database with consistent global ACID transactions and SQL semantics

Google Cloud Spanner is the first and only relational database service that is both strongly consistent and horizontally scalable. Features include:

  • ACID transactions,
  • Relational schemas (and schema changes without downtime),
  • SQL queries, high performance,
  • Automatic scaling for horizontal scalability to hundreds or thousands of servers
  • Synchronous data replication, and node redundancy
  • Up to 99.999% (five 9s) of availability
  • Based upon the published Spanner research paper

Stack Overflow is Google's official community support channel for development questions.

Please include the appropriate client library language tag (, , , or ) with your question. You can also include the platform tag (, , or ).

647 questions
6
votes
2 answers

Does Google Cloud Spanner support default column values?

Having the capability to compute a UTC timestamp as the default value for a column is a handy feature of most popular database solutions. Does Google Cloud Spanner support this? If not, is this a possible roadmap item?
6
votes
1 answer

Cloud Spanner read vs Cloud Spanner SQL API

There are two different APIs provided by Cloud Spanner. What’s the difference between Cloud Spanner read vs Cloud Spanner SQL API?
Chi
  • 259
  • 3
  • 11
5
votes
1 answer

"Spanner operation failed" creating NULL_FILTERED indexes

I am unable to create indexes on Cloud Spanner tables, receiving the error, "Spanner operation failed". Even after increasing the cluster size to from 6 to 16 nodes, I am unable to create two indexes on a ~12 million row table. What I did: Created…
dsquier
  • 268
  • 1
  • 9
5
votes
1 answer

Google DataFlow Apache Beam

I am trying to use Apache Beam to create a Dataflow pipeline and I am not able to follow the documentation and cannot find any examples. The pipeline is simple. Create a pipeline Read from a pub/sub topic Write to spanner. Currently, I am stuck at…
Anup
  • 627
  • 5
  • 19
5
votes
0 answers

Inserting rows to interleaved tables in a single transaction

I have table hierarchy as follows Table A - Root level Table B - Child of A Table C - Child of A Table D - Child of A I am inserting all the related rows in a single Commit transaction. The order of the insert statements are as…
5
votes
1 answer

Performance difference for STRING(MAX)?

Is there a performance penalty (or improvement) for using STRING(MAX) instead of some fixed limit like STRING(256)?
Mike Curtiss
  • 1,838
  • 2
  • 17
  • 33
5
votes
1 answer

Renaming columns and tables

Does the spanner supports renaming of columns and tables? That would be helpful while managing schema changes along with creating a new table from an existing one in a single statement.
5
votes
1 answer

Understanding INTERLEAVE in Cloud Spanner INDEX (indices)

What is difference between CREATE INDEX SongsBySingerSongName ON Songs(SingerId, SongName), INTERLEAVE IN Singers and CREATE INDEX SongsBySingerSongName ON Songs(SingerId, SongName)
5
votes
2 answers

Storing a UUID in Cloud Spanner

I would like to use a UUID as a primary key in Cloud Spanner. What is the best way to read and write UUIDs? Is there a UUID type, or client library support?
willwilson
  • 422
  • 3
  • 8
5
votes
1 answer

Autoincrement in Google Cloud Spanner

Google Cloud Spanner recommends against using monotonically increasing integers for primary keys. This makes a perfect sense for top-level tables as it would create hotspots. But what about interleaved tables? They are going to be stored on the same…
4
votes
1 answer

Cannot find default credentials in Cloud Run

I am writing a program that speaks with Cloud Spanner in Postgres Dialect. My application is a gin server and I am using pgadapter to connect as mentioned in this doc. My application runs fine locally. But when I deploy it to cloud run, I get the…
4
votes
1 answer

Migration from DynamoDB to Spanner/BigTable

I have a use case where I need to migrate 70 TB of data from DynamoDB to BigTable and Spanner. Tables with a single index will go to BigTable else they will go to Spanner. I can easily handle the historical loads by exporting the data to S3 --> GCS…
4
votes
2 answers

Getting error while connecting to jpa using micronaut-data-hibernate-jpa library

I want to use JPA for micronaut. For that I am using io.micronaut.data:micronaut-data-hibernate-jpa:1.0.0.M1 library. Whenever I run my application and hit the endpoint to get the data, I get the following error: { message: "Internal Server…
4
votes
2 answers

Is there a cost to having a large number of shards in Spanner?

Best practices for using Spanner strongly recommends avoiding the use of a timestamp or other sequential identifier as the first part of a key as this will create hotspots. One of the suggested workarounds when a time based ordering is required is…
SoftMemes
  • 5,602
  • 4
  • 32
  • 61
4
votes
1 answer

Streaming MutationGroups into Spanner

I'm trying to stream MutationGroups into spanner with SpannerIO. The goal is to write new MuationGroups every 10 seconds, as we will use spanner to query near-time KPI's. When I don't use any windows, I get the following error: Exception in thread…
1
2
3
43 44