SurrealDB Docs Logo

Enter a search query

Fivetran

Follow our setup guide to connect SurrealDB to Fivetran.

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

Follow these steps to set up SurrealDB as a destination in Fivetran. You have two options: self-hosted SurrealDB or Surreal Cloud.

Before proceeding with either option, ensure you have:

  • Access to your SurrealDB instance with appropriate permissions
  • The necessary connection details (endpoint URL, credentials)
  • Network connectivity between Fivetran and your SurrealDB instance

Option 1: Self-hosted SurrealDB

  1. 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.
  2. Set up the token and use it following SurrealDB’s Authentication documentation.

Option 2: Surreal Cloud

  1. Ensure your SurrealDB instance is up and running and accessible via Internet.

  2. Browse the Instances page and select your chosen Instance.

  3. Click Connect with Surreal CLI and locate the surreal sql —endpoint wss://YOUR_INSTANCE_HOSTNAME —token YOUR_TOKEN command.

  4. Run the command, and set up your own ACCESS or USER. 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;
  5. 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
  6. Make a note of the endpoint, user, and pass parameters. You will need them to configure Fivetran.

  7. (Optional) If you prefer using token, we recommend DEFINE ACCESS … TYPE JWT. Refer to the DEFINE 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

  1. Log in to your Fivetran account.
  2. Go to the Destinations page and click Add destination.
  3. Enter a Destination name of your choice.
  4. Click Add.
  5. Select SurrealDB as the destination type.
  6. Enter the url, user and pass (or token) you verified in the previous step.
Note

The url setting corresponds to the endpoint parameter you verified in the previous step.

  1. 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.