How can I connect to Cloud Spanner emulator vie wrench CLI?

285 Views Asked by At

I have a locally installed Cloud Spanner emulator, running in a docker container. How can I connect to it with wrench?

1

There are 1 best solutions below

0
On

In order to connect, there are several CLI parameters to define. Here is a complete command that creates a dump from the database:

SPANNER_EMULATOR_HOST=localhost:7010 wrench --database testdb --project testproj --instance testinst load --schema_file dump.sql

In order to execute other commands, you may need to replace the end of this command, starting from load onwards.