operation = dbAdminClient.updateDatabaseDdl(
+ db,
+ ImmutableList.of(createTableStatement),
+ null);
+ try {
+ return operation.get();
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+}
diff --git a/nb-adapters/adapter-gcp-spanner/src/main/java/io/nosqlbench/adapter/gcpspanner/types/GCPSpannerOpType.java b/nb-adapters/adapter-gcp-spanner/src/main/java/io/nosqlbench/adapter/gcpspanner/types/GCPSpannerOpType.java
new file mode 100644
index 000000000..e55551c8f
--- /dev/null
+++ b/nb-adapters/adapter-gcp-spanner/src/main/java/io/nosqlbench/adapter/gcpspanner/types/GCPSpannerOpType.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2020-2024 nosqlbench
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package io.nosqlbench.adapter.gcpspanner.types;
+
+/**
+ * All the spanner rpc api calls are defined here, representing a
+ * guide to the set of operations we should define if we want to implement full Spanner api support.
+ *
+ * NOTE that the vector search functionality is still in pre-GA and is not available through rpc calls other than simply
+ * calling ExecuteSql. The SQL functionality related to vector indices is documented
+ * here
+ *
+ * KNN and ANN search through Google SQL are documented respectively
+ * here
+ * and
+ * here
+ */
+public enum GCPSpannerOpType {
+ update_database_ddl,
+ insert,
+ execute_dml,
+}
diff --git a/nb-adapters/adapter-gcp-spanner/src/main/resources/activities/execute_index_ddl.yaml b/nb-adapters/adapter-gcp-spanner/src/main/resources/activities/execute_index_ddl.yaml
new file mode 100644
index 000000000..e7f67069d
--- /dev/null
+++ b/nb-adapters/adapter-gcp-spanner/src/main/resources/activities/execute_index_ddl.yaml
@@ -0,0 +1,13 @@
+scenarios:
+ default:
+ execute_ddl: run driver=spanner tags==blocks:execute_ddl service_account_file=TEMPLATE(service_account_file)
+ project_id=TEMPLATE(project_id) instance_id=TEMPLATE(instance_id) database_id=TEMPLATE(database_id) cycles=1
+
+# https://cloud.google.com/spanner/docs/reference/standard-sql/data-definition-language#vector_index_option_list
+blocks:
+ execute_ddl:
+ ops:
+ op1:
+ update_database_ddl: |
+ CREATE VECTOR INDEX VectorsIndex ON vectors(value)
+ OPTIONS (distance_type = 'COSINE', tree_depth = 3, num_branches=1000, num_leaves = 1000000);
diff --git a/nb-adapters/adapter-gcp-spanner/src/main/resources/activities/execute_queryvector_dml.yaml b/nb-adapters/adapter-gcp-spanner/src/main/resources/activities/execute_queryvector_dml.yaml
new file mode 100644
index 000000000..9357e4b2f
--- /dev/null
+++ b/nb-adapters/adapter-gcp-spanner/src/main/resources/activities/execute_queryvector_dml.yaml
@@ -0,0 +1,18 @@
+scenarios:
+ default:
+ execute_dml: run driver=spanner tags==blocks:execute_dml service_account_file=TEMPLATE(service_account_file)
+ project_id=TEMPLATE(project_id) instance_id=TEMPLATE(instance_id) database_id=TEMPLATE(database_id) cycles=TEMPLATE(cycles)
+
+bindings:
+ rw_key: ToString();
+ test_vector_hdf5: HdfFileToFloatList("testdata/TEMPLATE(dataset).hdf5", "/test"); ToCqlVector()
+ validation_set_hdf5: HdfFileToIntArray("testdata/TEMPLATE(dataset).hdf5", "/neighbors")
+
+
+blocks:
+ execute_dml:
+ ops:
+ op1:
+ execute_dml: |
+ SELECT * FROM vectors@{FORCE_INDEX=VectorsIndex} ORDER BY APPROX_COSINE_DISTANCE(ARRAY{test_vector_hdf5},
+ value, options => JSON '{"num_leaves_to_search": 10}') LIMIT 100
diff --git a/nb-adapters/adapter-gcp-spanner/src/main/resources/activities/execute_table_ddl.yaml b/nb-adapters/adapter-gcp-spanner/src/main/resources/activities/execute_table_ddl.yaml
new file mode 100644
index 000000000..5a33d38a4
--- /dev/null
+++ b/nb-adapters/adapter-gcp-spanner/src/main/resources/activities/execute_table_ddl.yaml
@@ -0,0 +1,11 @@
+scenarios:
+ default:
+ execute_ddl: run driver=spanner tags==blocks:execute_ddl service_account_file=TEMPLATE(service_account_file)
+ project_id=TEMPLATE(project_id) instance_id=TEMPLATE(instance_id) database_id=TEMPLATE(database_id) cycles=1
+
+blocks:
+ execute_ddl:
+ ops:
+ op1:
+ update_database_ddl: |
+ CREATE TABLE vectors (keycol STRING(100),value ARRAY(vector_length=>25) NOT NULL) PRIMARY KEY(keycol)
diff --git a/nb-adapters/adapter-gcp-spanner/src/main/resources/activities/insert_vector.yaml b/nb-adapters/adapter-gcp-spanner/src/main/resources/activities/insert_vector.yaml
new file mode 100644
index 000000000..d15c1bce3
--- /dev/null
+++ b/nb-adapters/adapter-gcp-spanner/src/main/resources/activities/insert_vector.yaml
@@ -0,0 +1,18 @@
+scenarios:
+ default:
+ insert_vector: >-
+ run driver=spanner tags==blocks:insert_vector service_account_file=TEMPLATE(service_account_file)
+ project_id=TEMPLATE(project_id) instance_id=TEMPLATE(instance_id) database_id=TEMPLATE(database_id) cycles=TEMPLATE(cycles)
+
+bindings:
+ rw_key: ToString();
+ train_floatlist: HdfFileToFloatArray("glove-25-angular.hdf5", "/train");
+
+blocks:
+ insert_vector:
+ ops:
+ op1:
+ insert_vector: "vectors"
+ query_params:
+ keycol: "{rw_key}"
+ value: "{train_floatlist}"
diff --git a/nb-adapters/adapter-gcp-spanner/src/main/resources/spanner.md b/nb-adapters/adapter-gcp-spanner/src/main/resources/spanner.md
new file mode 100644
index 000000000..70fc12fcc
--- /dev/null
+++ b/nb-adapters/adapter-gcp-spanner/src/main/resources/spanner.md
@@ -0,0 +1,30 @@
+# Google Spanner driver adapter
+The Google Cloud Spanner driver adapter is a NoSQLBench adapter for the `gcp_spanner` driver, a Java driver
+for connecting to and performing operations on an instance of a Google Cloud Spanner database.
+
+## Activity Parameters
+
+The following parameters must be supplied to the adapter at runtime in order to successfully connect to an
+instance of the [Google Cloud Spanner database](https://cloud.google.com/java/docs/reference/google-cloud-spanner/latest/overview):
+
+* `service_account_file` - In order to connect to a Spanner database you must have a [IAM service account](https://cloud.google.com/docs/authentication/provide-credentials-adc#service-account)
+defined with the appropriate permissions associated with the adapter. Once the service account is created you can download
+a file from the gcp console in JSON format that contains the credentials for the service account. This file must be provided
+to the adapter at runtime.
+* `project_id` - Project ID containing the Spanner database. See [Creating a project](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
+* `instance_id` - Spanner database's Instance ID. See [Creating an instance](https://cloud.google.com/spanner/docs/getting-started/java#create_an_instance).
+* `database_id` - Spanner database's Database ID. See [Creating a database](https://cloud.google.com/spanner/docs/getting-started/java#create_a_database).
+* In addition to this the environment variable `GOOGLE_APPLICATION_CREDENTIALS` must be set to the path of the service account file.
+
+## Op Templates
+
+The Google Cloud Spanner adapter supports the following operations:
+* `update_database_ddl` - Data Definition Language operations such as creating and dropping tables, indexes, etc.
+* `execute_dml` - Data Manipulation Language operations. Read only operations are supported at this time, including queries
+and vector queries.
+* `insert` - Insert a single record, vector or non-vector, of data into the database.
+## Examples
+
+
+
+---
diff --git a/nb-adapters/adapter-jdbc/pom.xml b/nb-adapters/adapter-jdbc/pom.xml
index 987742f5e..630a7ab2a 100644
--- a/nb-adapters/adapter-jdbc/pom.xml
+++ b/nb-adapters/adapter-jdbc/pom.xml
@@ -61,13 +61,6 @@
5.0.1