- JDK v17
- Gradle 8 (here is an installation instruction)
- Download proto files
wget -O src/main/proto/common.proto https://raw.githubusercontent.com/fivetran/fivetran_sdk/production/common.proto
wget -O src/main/proto/connector_sdk.proto https://raw.githubusercontent.com/fivetran/fivetran_sdk/production/connector_sdk.proto
- Build the Jar
gradle jar
- Run the Jar
java -jar build/libs/singlestore-fivetran-connector-0.0.3.jar
- Start SingleStore cluster You must insert a valid SingleStore license as SINGLESTORE_LICENSE and a password as ROOT_PASSWORD
docker run \
-d --name singlestoredb-dev \
-e SINGLESTORE_LICENSE=<YOUR SINGLESTORE LICENSE> \
-e ROOT_PASSWORD=<YOUR SINGLESTORE ROOT PASSWORD> \
-e SINGLESTORE_VERSION="8.7.16" \
-p 3306:3306 -p 8080:8080 -p 9000:9000 \
ghcr.io/singlestore-labs/singlestoredb-dev:latest
-
Wait for database to start
-
Enable OBSERVE queries support
SET GLOBAL enable_observe_queries = 1;
- Create
ROOT_PASSWORD
environment variable
export ROOT_PASSWORD="YOUR SINGLESTORE ROOT PASSWORD"
- Download proto files
wget -O src/main/proto/common.proto https://raw.githubusercontent.com/fivetran/fivetran_sdk/production/common.proto
wget -O src/main/proto/connector_sdk.proto https://raw.githubusercontent.com/fivetran/fivetran_sdk/production/connector_sdk.proto
- Run tests
gradle build
- Start SingleStore cluster You must insert a valid SingleStore license as SINGLESTORE_LICENSE and a password as ROOT_PASSWORD
docker run \
-d --name singlestoredb-dev \
-e SINGLESTORE_LICENSE=<YOUR SINGLESTORE LICENSE> \
-e ROOT_PASSWORD=<YOUR SINGLESTORE ROOT PASSWORD> \
-e SINGLESTORE_VERSION="8.7.16" \
-p 3306:3306 -p 8080:8080 -p 9000:9000 \
ghcr.io/singlestore-labs/singlestoredb-dev:latest
-
Wait for database to start
-
Enable OBSERVE queries support
SET GLOBAL enable_observe_queries = 1;
- Create database and table
DROP DATABASE IF EXISTS tester;
CREATE DATABASE tester;
USE tester;
CREATE TABLE t(a INT PRIMARY KEY, b INT);
- Start Connector server
wget -O src/main/proto/common.proto https://raw.githubusercontent.com/fivetran/fivetran_sdk/production/common.proto
wget -O src/main/proto/connector_sdk.proto https://raw.githubusercontent.com/fivetran/fivetran_sdk/production/connector_sdk.proto
gradle jar
java -jar build/libs/singlestore-fivetran-connector-0.0.3.jar
-
Update the
./tester/configuration.json
file with your credentials -
Run the tester by following instructions from here. As a command use you can use
docker run --mount type=bind,source=<PATH TO PROJECT>/tester,target=/data -a STDIN -a STDOUT -a STDERR -it -e GRPC_HOSTNAME=localhost --network=host fivetrandocker/fivetran-sdk-tester:0.24.0729.001 --tester-type source --port 55051
- Update table
INSERT INTO t VALUES(1, 2);
INSERT INTO t VALUES(2, 2);
DELETE FROM t WHERE a = 1;
UPDATE t SET b = 3 WHERE a = 2;