CockroachDB

Stream data into CockroachDB

Prerequisites

  • A CockroachDB Cloud user account

Granting Privileges

It's recommended to create a separate user for Streamkap to access your CockroachDB database.

Create user via SQL Shell

In the left hand navigation menu, open SQL Shell.

Switch to the database you will be sending data to or create a new database.

Run the script below replacing items in {} with the appropriate values

-- Create User
CREATE USER streamkap_user WITH PASSWORD {'password'};

Create user via Cloud

In the left hand navigation menu, open SQL users under Security.

Input streamkap_user and generate a password

Get Connection Details

  • Click Connect and copy the host string, which will look similar to this
    • prime-gecko-43434.6wr.cockroachlabs.cloud

Allow Streamkap IP address

In the left hand navigation menu, open Networking under Security.

Add the appropriate IP address from Streamkap IP Addresses

Streamkap Setup

  1. Go to Destinations and choose CockroachDB

  2. Input the following information:

    • Name - A unique and memorable name for this Connector
    • Hostname - The hostname connection string without the port.
    • Port - The port number of the connection - default 26257
    • Username (Case sensitive) - STREAMKAP_USER OR the username you chose
    • Password - The password for your username
    • Database Name (Case sensitive) - STREAMKAPDB OR the database name you chose
    • Insert Mode Insert or Upserts (i.e. append only or replace)
    • Delete Mode - Delete records in destination if deleted at source
    • Schema Evolution - Handle additional columns automatically?
    • Tasks - Amount of parallelism in writing events.
  3. Click Save