SurrealDB
This is the implementation of the SurrealDB data handler for MindsDB.
SurrealDB is an innovative NewSQL cloud database, suitable for serverless applications, jamstack applications, single-page applications, and traditional applications.
Prerequisites
Before proceeding, ensure the following prerequisites are met:
- Install MindsDB locally via Docker or Docker Desktop.
- To connect SurrealDB to MindsDB, install the required dependencies following this instruction.
- Install or ensure access to SurrealDB.
Implementation
This handler was implemented by using the python library pysurrealdb
.
The required arguments to establish a connection are:
host
: the host name of the Surrealdb connectionport
: the port to use when connectinguser
: the user to authenticatepassword
: the password to authenticate the userdatabase
: database name to be connectednamespace
: namespace name to be connected
Usage
To establish a connection with our SurrealDB server which is running locally with the public cloud instance. We are going to use ngrok tunneling
to connect cloud instance to the local SurrealDB server. You can follow this guide for that.
Let’s make the connection with the MindsDB public cloud
Please change the host
and port
properties in the PARAMETERS
clause based on the values which you got.
We can also query the dev
table which we created with