CommunityRecherche & Datenanalysegithub.com

24601/surreal-skills

Datenmigration und Synchronisation zu SurrealDB aus MongoDB, PostgreSQL, MySQL, Neo4j, Kafka und JSONL. Vollständige und inkrementelle CDC-Synchronisation. Teil der surreal-skills-Sammlung.

Was ist surreal-skills?

Surreal-Sync ist ein CLI-Tool zur Migration von Daten aus verschiedenen Datenbankquellen (MongoDB, MySQL, PostgreSQL, Neo4j, Kafka, JSONL) nach SurrealDB. Es unterstützt sowohl vollständige Synchronisation als auch inkrementelle Synchronisation mittels Change Data Capture (CDC), sodass Änderungen in Echtzeit übertragen werden können. Das Tool eignet sich besonders für Entwickler, die Datenmigrationen und -synchronisationen zwischen heterogenen Systemen und SurrealDB automatisieren möchten. Es wird als Rust-Binärdatei über `cargo install surreal-sync` installiert und bietet ein einheitliches CLI-Muster für alle Quellen. Zu den wichtigsten Funktionen gehören automatische Schema-Inferenz, Beziehungsextraktion für Graph-Kanten, konfigurierbare Batch-Größen und Parallelität sowie wiederaufnehmbare Synchronisation mit Checkpoint-Tracking.

Funktioniert mit~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/24601/surreal-skills/tree/main/skills/surreal-sync

Installed? Explore more Recherche & Datenanalyse skills: affaan-m/uspto-database, affaan-m/scholar-evaluation, affaan-m/literature-review · View all 6 →

In Ihrer bevorzugten KI fragen

Öffnet einen neuen Chat, in dem dieser Agent-Skill bereits geladen ist.

Dokumentation

Surreal-Sync – Datenmigration und Synchronisation

Surreal-Sync ist ein CLI-Tool zur Migration von Daten aus verschiedenen Datenbankquellen nach SurrealDB mit vollständiger und inkrementeller Synchronisation mittels Change Data Capture (CDC).

Unterstützte Quellen

QuelleVollständige SynchronisationInkrementelles CDCMethode
MongoDBJaJaChange Streams
MySQLJaJaTrigger-basiertes CDC + Sequenz-Checkpoints
PostgreSQL (Trigger)JaJaTrigger-basiertes CDC + Sequenz-Checkpoints
PostgreSQL (wal2json)JaJaLogische Replikation mit wal2json-Plugin
Neo4jJaJaZeitstempel-basiertes Tracking
JSONL-DateienJaNicht verfügbarBatch-Import aus JSON Lines
Apache KafkaJaJaConsumer-Abonnements mit Deduplizierung

Schnellstart

# Installieren von surreal-sync (Rust-Binärdatei)
cargo install surreal-sync

# Vollständige Synchronisation von PostgreSQL (Trigger-basiert)
surreal-sync from postgres trigger-full \
  --connection-string "postgresql://user:pass@localhost/mydb" \
  --surreal-endpoint "http://localhost:8000" \
  --surreal-username root \
  --surreal-password root \
  --to-namespace prod \
  --to-database main

# Inkrementelles CDC von PostgreSQL (wal2json)
surreal-sync from postgres wal2json \
  --connection-string "postgresql://user:pass@localhost/mydb" \
  --surreal-endpoint "http://localhost:8000" \
  --surreal-username root \
  --surreal-password root \
  --to-namespace prod \
  --to-database main

# Vollständige Synchronisation von MongoDB
surreal-sync from mongo full \
  --connection-string "mongodb://localhost:27017/mydb" \
  --surreal-endpoint "http://localhost:8000" \
  --surreal-username root \
  --surreal-password root \
  --to-namespace prod \
  --to-database main

# Batch-Import aus JSONL
surreal-sync from jsonl import \
  --file data.jsonl \
  --surreal-endpoint "http://localhost:8000" \
  --surreal-username root \
  --surreal-password root \
  --to-namespace prod \
  --to-database main

# Konsumieren von Kafka
surreal-sync from kafka consume \
  --bootstrap-servers "localhost:9092" \
  --topic my-events \
  --surreal-endpoint "http://localhost:8000" \
  --surreal-username root \
  --surreal-password root \
  --to-namespace prod \
  --to-database main

CLI-Muster

surreal-sync from <QUELLE> <BEFEHL> \
  --connection-string [VERBINDUNGSZEICHENKETTE] \
  --surreal-endpoint [SURREAL-ENDPUNKT] \
  --surreal-username [SURREAL-BENUTZERNAME] \
  --surreal-password [SURREAL-PASSWORT] \
  --to-namespace <NS> \
  --to-database <DB>

Hauptfunktionen

  • Automatische Schema-Inferenz und Erstellung von SurrealDB-Tabellen
  • Mapping von Datensatz-IDs aus Quellprimärschlüsseln
  • Beziehungsextraktion und Erstellung von Graph-Kanten
  • Konfigurierbare Batch-Größen und Parallelität
  • Wiederaufnehmbare Synchronisation mit Checkpoint-Tracking
  • Deduplizierung für Kafka-Consumer

Vollständige Dokumentation

Siehe die Hauptregeldatei für vollständige Anleitungen:

Individual skills in this repo

This repo contains 5 individual skills — each has its own dedicated page.

Verwandte Skills