Skip to main content
CockroachDB logo

CockroachDB


Overview

Connect Superblocks to CockroachDB to build apps with read and write access to a CockroachDB database. Read data from a CockroachDB database and utilize it in API steps or UI components:

Read data from a CockroachDB database and use it within an Application

Save information to a CockroachDB database:

Write data into a CockroachDB database using SQL in a backend API

Setting up CockroachDB

1. Add integration

Select CockroachDB from the integrations page.

2. Configure settings

Fill out the form with the following settings:

SettingRequiredDescription
NameTRUEName that will be displayed to users when selecting this integration in Superblocks
HostTRUEHostname or IP address to connect to
PortTRUEPort to use when connecting to CockroachDB
Database NameTRUEName of database to connect to
Database UsernameTRUEUsername to use to connect
Database PasswordTRUEPassword for database username
Enable SSLFALSEConnect via SSL if selected
Use a self-signed SSL certificateFALSEProvide Server CA, Client Key, and Client Cert if selected

3. Test and save

Click Test Connection to check that Superblocks can connect to the data source.

info

If using Superblocks Cloud, add these Superblocks IPs to your allowlist (not necessary for On-Premise-Agent).

After connecting successfully, click Create to save the integration.

4. Set profiles

Optionally, configure different profiles for separate development environments.

tip

CockroachDB connected Now you can use CockroachDB in any Application, Workflow, or Scheduled Job.

Creating CockroachDB steps

Connect to your CockroachDB integration from Superblocks by creating steps in Application APIs, Workflows and Scheduled Jobs. You can configure a Superblocks CockroachDB integration with read only, read/write, or write only users. You can then configure a Superblocks CockroachDB step to read from a database, as well as modify/delete data. To get started, enter your SQL query into the text area of the CockroachDB step. Then click "Run" to see the Result and Executed SQL statement below.

See the results of a CockroachDB query

info

See our guide for setting up basic CRUD actions using CockroachDB.

Use cases

Applications

Create an admin dashboard that reads from CockroachDB and other sources. Mix in APIs to allow support agents to refund orders, update shipping statuses, or transform large datasets in a single UI.

Admin dashboard reads from CockroachDB allowing for order refunds

Workflows

Enrich customer order data within CockroachDB with shipping data from Snowflake or other datastores.

Use a workflow to enrich CockroachDB data with data from other datastores like Snowflake

Scheduled Jobs

Post data from CockroachDB to a Slack channel on a daily basis for teams who need to see information on new bookings, but don't have access to the database.

Use a scheduled job to query CockroachDB and send out a daily report

Troubleshooting

Check out our guide on common errors across database integrations, in addition to Troubleshoot Common Problems. If you are encountering an error that you don't see in the guide, or the provided steps are insufficient to resolve the error, please contact us at help@superblocks.com.