SurrealDB Destination Setup Guide Partner-Built In Dev
Follow our setup guide to connect SurrealDB to Fivetran.
NOTE: This destination is partner-built. For any questions related to self-hosted SurrealDB destination and its documentation, contact SurrealDB Support. For SurrealDB Cloud, refer to Surreal Cloud Suppoort.
Prerequisites
To connect SurrealDB to Fivetran, you need the following:
- A Fivetran role with the Create Destinations or Manage Destinations permissions.
- A SurrealDB token.
- A SurrealDB instance (self-hosted or Cloud) that is accessible by Fivetran.
Setup instructions
Get URL and token
Option 1: Self-hosted SurrealDB
- For self-hosted SurrealDB, ensure your SurrealDB instance is accessible by Fivetran according to your Fivetran deployment:
- For Fivetran SaaS Deployment, ensure your SurrealDB is accessible via Internet.
- For Fivetran Hybrid Deployment, ensure your SurrealDB is accessible by the Fivetran Hybrid Deployment Agent.
- For Fivetran Self-Hosted Deployment, ensure your SurrealDB is accessible by the Fivetran HVR Agent.
- Set up the token and use it following SurrealDB's Authentication documentation.
Option 2: Surreal Cloud
Ensure your SurrealDB instance is up and running and accessible via Internet.
Browse the Instances page and select your chosen instance.
Click Connect with Surreal CLI and locate the
surreal sql --endpoint wss://YOUR_INSTANCE_HOSTNAME --token YOUR_TOKEN
command.Run the command, and set up your own
ACCESS
orUSER
. The example below works for testing purposes:USE NS your_ns; USE DB your_db; DEFINE USER your_user ON DATABASE PASSWORD "YourPassword" ROLES OWNER;
Ensure the user/pass is working by running:
surreal sql --endpoint wss://YOUR_INSTANCE_HOSTNAME --user your_user --pass YourPassword --ns your_ns --db your_db
Make a note of the
endpoint
,user
, andpass
parameters. You will need them to configure Fivetran.(Optional) If you prefer using
token
, we recommendDEFINE ACCESS ... TYPE JWT
. Refer to theDEFINE ACCESS > JWT
documentation to set up JWT access.- Verify if the token is working before proceeding to the next section, by running:
surreal sql --endpoint wss://YOUR_INSTANCE_HOSTNAME --token your_token --ns your_ns --db your_db
Finish Fivetran configuration
- Log in to your Fivetran account.
- Go to the Destinations page and click Add destination.
- Enter a Destination name of your choice.
- Click Add.
- Select SurrealDB as the destination type.
- Enter the
url
,user
andpass
(ortoken
) you verified in the previous step.NOTE: The
url
setting corresponds to theendpoint
parameter you verified in the previous step. - Click Save & Test.
Fivetran tests and validates the SurrealDB connection. Upon successfully completing the setup tests, you can sync your data using Fivetran connectors to the SurrealDB destination.
In addition, Fivetran automatically configures a Fivetran Platform Connector to transfer the connector logs and account metadata to a schema in this destination. The Fivetran Platform Connector enables you to monitor your connectors, track your usage, and audit changes. The connector sends all these details at the destination level.
IMPORTANT: If you are an Account Administrator, you can manually add the Fivetran Platform Connector on an account level so that it syncs all the metadata and logs for all the destinations in your account to a single destination. If an account-level Fivetran Platform Connector is already configured in a destination in your Fivetran account, then we don't add destination-level Fivetran Platform Connectors to the new destinations you create.
Setup tests
Fivetran performs the following SurrealDB connection tests:
- The Database Connection test checks if we can connect to your SurrealDB database using the provided URL and token.
The test should complete in a few seconds if your Fivetran deployment can access the target SurrealDB instance.
Related articles
description Destination Overview
settings API Destination Configuration