SurrealDB Docs Logo

Enter a search query

Export command

The ML export command is used to export an existing machine learning model from SurrealDB.

BEFORE YOU START

Make sure you’ve installed SurrealDB — it should only take a second!

Command arguments

ArgumentsDescription

-e,--endpoint/--conn

optional

Sets the url of the database server to connect to

-u / --user

required

Sets master username for the database

-p / --pass

required

Sets master password for the database

-t / --token

optional

Sets the authentication token to use when connecting to the server. Connect to SurrealDB using a JWT instead of user credentials

--ns

required

Sets the desired namespace in which to import data

--db

required

Sets the desired database into which to import data

--name

required

Represents the name of the model that you want to export

--version

required

Represents the version of the model that you want to export

Positional argument

ArgumentsDescription

file

required

Sets the path to the file which should be exported

Example usage

To perform a SurrealQL database import from a local file, in a terminal run the surreal import command with the required arguments.

surreal ml export --conn http://localhost:8000 --user root --pass root --ns test --db test --name my-surrealml-model --version 1.0.0 my-surrealml-model.surml

Using token based authentication

surreal ml export --conn http://localhost:8000 --token <token> --ns test --db test --name my-surrealml-model --version 1.0.0 my-surrealml-model.surml

Command help

To see the help information and usage instructions, in a terminal run the surreal ml export --help command without any further arguments. This command gives general information on the arguments, inputs, and additional options for the ml export command.

surreal ml export --help

The output of the above command :

Export a SurrealML model from an existing database Usage: surreal ml export [OPTIONS] --name <NAME> --version <VERSION> --namespace <NAMESPACE> --database <DATABASE> [FILE] Arguments: [FILE] Path to the SurrealML file to export. Use dash - to write into stdout. [default: -] Options: --name <NAME> The name of the model [env: SURREAL_NAME=] --version <VERSION> The version of the model [env: SURREAL_VERSION=] -e, --endpoint <ENDPOINT> Remote database server url to connect to [default: ws://localhost:8000] [aliases: conn] -u, --username <USERNAME> Database authentication username to use when connecting [env: SURREAL_USER=] [aliases: user] -p, --password <PASSWORD> Database authentication password to use when connecting [env: SURREAL_PASS=] [aliases: pass] -t, --token <TOKEN> Authentication token in JWT format to use when connecting [env: SURREAL_TOKEN=] --auth-level <AUTH_LEVEL> Authentication level to use when connecting Must be enabled in the server and uses the values of '--namespace' and '--database' [env: SURREAL_AUTH_LEVEL=] [default: root] [possible values: root, namespace, ns, database, db] --namespace <NAMESPACE> The namespace selected for the operation [env: SURREAL_NAMESPACE=] [aliases: ns] --database <DATABASE> The database selected for the operation [env: SURREAL_DATABASE=] [aliases: db] -h, --help Print help

On this page

© SurrealDB GitHub Discord Community Cloud Features Releases Install