01 / SQL to NoSQL
Joins do not fit a document store
An application wants one order document with its customer and lines inside. Building it means joining tables, watching every table in the join for changes and rewriting the right documents.
Gluesync Module · SQL and NoSQL modeling
2.3.2Shape data between SQL and NoSQL without custom code. Write a SQL query and get flat or nested JSON documents, split one document into related SQL tables, and move your Gluesync 1.x data models over in one conversion.
| Field | Type | Document |
|---|---|---|
ORDER_ID | int | Key |
ORDER_NO | varchar (20) | same name |
STATUS | varchar (10) | same name |
ORDER_DATE | date | same name |
CUSTOMER_NAME | nvarchar (100) | PII:name |
CUSTOMER_CITY | nvarchar (60) | same name |
lines array | 4 fields | lines[] |
ORDERS_DOC::1042
{ "ORDER_ID": 1042, "ORDER_NO": "SO-01042", "STATUS": "OPEN", "ORDER_DATE": "2026-01-02", "CUSTOMER_NAME": "Customer 7", "CUSTOMER_CITY": "Lyon", "lines": [ { "LINE_NO": 1, "SKU": "A-100", "QTY": 2, "PRICE": 49.0 }, { "LINE_NO": 2, "SKU": "B-220", "QTY": 1, "PRICE": 50.5 } ]}
Why Data modeling
01 / SQL to NoSQL
An application wants one order document with its customer and lines inside. Building it means joining tables, watching every table in the join for changes and rewriting the right documents.
02 / NoSQL to SQL
A document with arrays of cards and tokens belongs in several related tables. Splitting it by hand means keys, parent links and deletes handled in custom code.
03 / The platform outcome
Gluesync keeps documents and tables current from the same definition, and carries your Gluesync 1.x models over with one conversion.
How it works
Define
Write the SQL query and add a level for each array, or choose the levels of the document to split. The wizard for Query entities walks the query, the key, the target mapping and the review.
Check
Describe types the columns and returns the CDC verdict. Preview builds the first documents from the live source without writing them. Validate reports every issue at once.
Run
A snapshot loads the current data, then change data capture keeps every document and table in step with its source.
Capabilities
Data modeling runs inside Core Hub and the agents you already use. SQL Server CDC is the source of Query entities, Couchbase is the source of document models, and every definition is checked before it runs.
Query entities
The source of an entity is a SQL query. Joins, filters and sub-selects over your SQL Server tables become one document per root key, written to Couchbase and other NoSQL targets. Add a level for each array of child rows and the document nests them.
SQL Serversales
| ORDER_ID | ORDER_NO | STATUS | CUSTOMER_ID |
|---|---|---|---|
1042 | SO-01042 | OPEN | 7 |
1043 | SO-01043 | OPEN | 7 |
| CUSTOMER_ID | NAME | CITY |
|---|---|---|
7 | Customer 7 | Lyon |
12 | Customer 12 | Turin |
| ORDER_ID | LINE_NO | SKU | QTY |
|---|---|---|---|
1042 | 1 | A-100 | 2 |
1042 | 2 | B-220 | 1 |
{ "ORDER_ID": 1042, "ORDER_NO": "SO-01042", "STATUS": "OPEN", "ORDER_DATE": "2026-01-02", "CUSTOMER_NAME": "Customer 7", "CUSTOMER_CITY": "Lyon", "lines": [ { "LINE_NO": 1, "SKU": "A-100", "QTY": 2, "PRICE": 49.0 }, { "LINE_NO": 2, "SKU": "B-220", "QTY": 1, "PRICE": 50.5 } ]}
Write the SELECT once. A flat entity gives one document per root row. Add a level and each array becomes part of the same document, rebuilt whenever a table it reads changes.
Document models
A Couchbase document with nested arrays lands in SQL Server as related tables. Each level gets its own table, its own key and a link to its parent. A holder document with cards and tokens becomes three tables.
{ "Owner": "H0002", "Name": "Holder 2", "Profile": { "email": "h2@example.com" }, "Cards": [ { "CardUid": "C0002-1", "Type": "VISA", "Tokens": [ { "TokenId": "T0002-1-1", "Status": "ACTIVE" } ] }, { "CardUid": "C0002-2", "Type": "MASTERCARD", "Tokens": [ { "TokenId": "T0002-2-1", "Status": "ACTIVE" } ] } ]}
| Owner PK | Name | |
|---|---|---|
H0002 | Holder 2 | h2@example.com |
| CardUid PK | HolderRef FK | Type |
|---|---|---|
C0002-1 | H0002 | VISA |
C0002-2 | H0002 | MASTERCARD |
| TokenId PK | CardUid FK | Status |
|---|---|---|
T0002-1-1 | C0002-1 | ACTIVE |
T0002-2-1 | C0002-2 | ACTIVE |
Apply removes the rows. Report only keeps them and records what would have been deleted. Chain scope reaches child tables whose keys do not carry the root key. Each level sets its own policy.
Gluesync 1.x migration
Gluesync Automator turns the entities of a Gluesync 1.x configuration into Gluesync 2 entities on an existing pipeline, from its Import tab or the command line. It reports what became of every entity, and Core Hub checks every draft before anything is saved.
| Save | GS1 entity | Bucket | Converter report | Core Hub checks |
|---|---|---|---|---|
| ORDERS | MULTI_LEVEL | describe: CDC; proposed keys root [ORDER_ID] validate: valid |
||
| CUSTOMERS | FLAT | describe: CDC; proposed keys root [CUSTOMER_ID] validate: valid |
||
| INVOICES | MULTI_LEVEL | describe: CDC; proposed keys root [INVOICE_ID] validate: valid |
||
| PRODUCTS | FLAT | describe: CDC; proposed keys root [SKU] validate: valid |
Secret keys removed unread: none
Dates in custom formats, arrays and maps as JSON text, type discriminators, duplicate keys and document ids come out of the migrated entity the way they came out of the 1.x one.
FAQ
An entity whose source is a SQL query instead of a table. Gluesync writes one document per root key, flat or with nested arrays of child rows, and keeps it current as the source tables change.
The source is SQL Server with change data capture. Documents are written to Couchbase and other NoSQL targets, as flat JSON or as multi-level JSON with an array per child level.
SQL Server CDC reads the change tables of every table the query reads. Gluesync finds the documents a change touches, reads them again from the source and writes them whole, so a change to a customer updates every order document that holds it.
Yes. Describe returns the typed columns, the proposed key, the tables read and the CDC verdict without running the statement. Preview shows the documents the query would write, with their ids, and validate reports every issue at once. Preview values are masked like Query Studio results.
It splits one Couchbase document into SQL Server tables, one level per table, each with its key and a link to its parent. Embedded objects become columns of the parent row or tables of their own, and arrays of scalars become rows.
Each level has its own delete policy. Apply removes the rows, report only keeps them and records what would have been deleted, and off ignores deletes. Chain scope reaches child tables whose keys do not carry the root key.
Open Gluesync Automator, or run its command line, upload the 1.x configuration, pick the pipeline and the Gluesync 1.x product, and convert. The report lists every entity and Core Hub checks each draft. You choose the drafts and confirm the save, and nothing is saved without that confirmation. Then compare live documents with what the new entity writes and cut over collection by collection.
In Gluesync Automator, from the Import tab or the command line. Both run the same steps: convert the configuration, let Core Hub describe and validate every draft without writing anything, then save the drafts you choose once you confirm.
Yes. They keep dates in custom formats, arrays and maps written as JSON text, type discriminators, duplicate keys with the last item winning, and Gluesync 1 document ids.
In the Control Plane, where a guided wizard walks Query entities from the SQL query to the review, and through the REST API and the MCP server. The conversion of Gluesync 1.x models runs in Gluesync Automator.
Explore the platform
Data modeling builds on the pipelines, the SQL workbench and the schedules you already use.
Field functions, filters and UDFs that shape the values inside every document and row.
Explore Data transformation →The SQL workbench where you try a query before it becomes an entity.
Explore Query Studio →Refresh a snapshot-only Query entity on a Chronos schedule.
Explore Schedules and events →Converts your Gluesync 1.x data models into Gluesync 2 entities, in its UI or from the command line.
Explore Gluesync Automator →Resources
Technical guides, API reference, deployment tutorials.
Read documentation ↗What we're building next. Submit feature requests.
View roadmap ↗Access technical support and operational assistance.
Get support →Real-time platform availability and incident history.
Check status ↗Request a free trial or talk with the MOLO17 team about SQL to NoSQL modeling and migrating your Gluesync 1.x models.