Migrate data to SurrealDB with Surreal Sync

Surreal Sync migrates data to SurrealDB from Neo4J, MongoDB, and JSON Lines, with type conversion and ETL; perfect for migrations, AI, and BI with support from Q2BSTUDIO.

sábado, 16 de agosto de 2025 • 4 min read • Q2BSTUDIO Team

Artificial-Intelligence-

Note: Surreal Sync is under active development and is not yet a stable version. We appreciate any feedback about the tool through an issue or PR in the surreal-sync repository on GitHub or in the SurrealDB community. Today we announce the release of Surreal Sync, a command-line tool that allows you to migrate existing data from another database directly to SurrealDB.

Surreal Sync runs entirely from the terminal and allows you to import data from multiple sources into a running SurrealDB instance. Example usage to connect to Neo4J at bolt://localhost:7687 with user neo4j and password password and migrate to the production namespace and graph_data database in SurrealDB with user root and password secret:

surreal-sync sync neo4j --source-uri bolt://localhost:7687 --source-username neo4j --source-password password --neo4j-timezone America/New_York --to-namespace production --to-database graph_data --surrealdb-username root --surrealdb-password secret

Currently the tool supports three main sources: Neo4J, MongoDB, and JSON Lines. When importing data from another system, it is necessary to convert types and, in the case of Neo4J, convert graph edges to SurrealDB-compatible edges in order to use the graph syntax -> without additional processing after migration.

The Surreal Sync documentation includes a page for each source explaining type conversion. In many cases the conversion is direct and considered Fully Supported, meaning complete semantic preservation and no data loss. For example, a MongoDB Map is converted to a SurrealDB object. If there is no direct equivalent, the type is stored as an object that retains most of the information and functionality, which is considered Partially Supported, for example Neo4J's Point3D is converted to a GeoJSON-style object with a coordinates field containing three floats with longitude, latitude, and elevation.

Type compatibility summary: Fully Supported means conversion with complete preservation; Partially Supported means data preservation but possible loss of semantics, precision, or type-specific functionality.

Importing from JSON Lines deserves special mention because it shows that Surreal Sync not only migrates data between databases but also from a data format to SurrealDB. SurrealDB also supports JSON Lines output for server logging, which makes it easy to convert log records into SurrealDB tables for analysis and querying.

Main rules for JSON Lines: each JSONL file will be converted into a table with the same name; each JSON object needs an id field for SurrealQL, if it does not exist you can use the --id-field flag to indicate which field to use as the id.

Example to convert a log.jsonl file to the log table in SurrealDB using timestamp as idsurreal-sync sync jsonl --source-uri /path/to/jsonl --to-namespace myns --to-database mydb --id-field timestamp

After import, a SELECT * FROM log query will return records with fields such as fields, level, target, and an id in the form log:?2025-07-22T03:18:59.349350Z? that allows you to identify each entry and efficiently query the imported data.

The official SurrealDB documentation includes a dedicated section on Surreal Sync, and the surreal-sync repository on GitHub contains the readme and detailed guides by data source, type conversions, and available command-line flags.

At Q2BSTUDIO we are a custom software and application development company specialized in custom projects, artificial intelligence, cybersecurity, and aws and azure cloud services. We offer custom software and custom application services for companies that need data migrations, integrations with modern databases, and artificial intelligence solutions. We can support migration with Surreal Sync and design data pipelines, business intelligence services, and power bi solutions to visualize and leverage information after migration.

Our services include artificial intelligence and AI consulting for businesses, development of custom AI agents, implementation of cybersecurity measures, and deployment and administration on aws and azure cloud services. If you need custom software to manage your data, integrate AI agents, or create business intelligence solutions with power bi, Q2BSTUDIO offers technical expertise and support throughout the entire process.

Advantages of trusting Q2BSTUDIO for migrations and comprehensive projects: expertise in custom applications and custom software; experience in artificial intelligence and AI agents to automate processes; focus on cybersecurity and compliance; deployment on aws and azure cloud services; creation of dashboards with power bi and business intelligence services to obtain actionable insights.

Contact and next step: we can audit your data source, define the type conversion strategy, and execute the migration to SurrealDB with Surreal Sync or through custom ETL processes. With Q2BSTUDIO your data migration and transformation project will have professional support in all areas, from data preparation to production deployment and visualization with power bi.

SEO keywords: custom applications, custom software, artificial intelligence, cybersecurity, aws and azure cloud services, business intelligence services, AI for businesses, AI agents, power bi.

A BREAK?

Play for a moment before you go

OUR SERVICES

How we can help you

Do you have a project in mind?

Tell us your vision and we'll turn it into a software solution. Whatever the scope, we make your idea real.