This is the implementation of the Cloud Spanner data handler for MindsDB. Cloud Spanner is a fully managed, mission-critical, relational database service that offers transactional consistency at global scale, automatic, synchronous replication for high availability. It supports two SQL dialects: GoogleSQL (ANSI 2011 with extensions) and PostgreSQL.Documentation Index
Fetch the complete documentation index at: https://docs.mindsdb.com/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before proceeding, ensure the following prerequisites are met:- Install MindsDB locally via Docker or Docker Desktop.
- To connect Cloud Spanner to MindsDB, install the required dependencies following this instruction.
- Install or ensure access to Cloud Spanner.
Implementation
This handler was implemented using thegoogle-cloud-spanner Python client library.
The required arguments to establish a connection are as follows:
instance_idis the instance identifier.database_idis the database identifier.projectis the identifier of the project that owns the resources.credentialsis a stringified GCP service account key JSON.
Usage
In order to make use of this handler and connect to the Cloud Spanner database in MindsDB, the following syntax can be used:Cloud Spanner supports both PostgreSQL and GoogleSQL dialects. However, not all PostgresSQL features are supported.