Gili Garibi
Gili Garibi

Reputation: 426

How to specify fully identified database qualifier in Google Spanner

https://cloud.google.com/sdk/gcloud/reference/spanner/databases/execute-sql says that the database positional parameter in an execute-sql command can be "ID of the database or fully qualified identifier for the database".

I can't find the syntax for such a fully qualified identifier. Looked/searched anywhere I could think of in the documentation.

Trying standard separators (slash, dot, colon, etc) produces random error messages.

Any ideas?

Upvotes: 0

Views: 404

Answers (2)

Ville Rinne
Ville Rinne

Reputation: 821

Here is an overview over resource names: https://cloud.google.com/iam/docs/full-resource-names. This indicates that the resource name (is this synonymous with identifier?) should be of the format: //spanner.googleapis.com/projects/project-id/instances/instance-id

Upvotes: 1

Knut Olav Løite
Knut Olav Løite

Reputation: 3512

The fully qualified name of a Cloud Spanner database takes the following format:

projects/<project-id>/instances/<instance-id>/databases/<database-id>

Upvotes: 1

Related Questions