Gluesync NoSQL to SQL

Installation steps

Basic configuration example

This video tutorial will guide you through the basic configurations steps on setting up Gluesync for Microsoft SQL Server and Couchbase

This module can be customized by using a configuration file in JSON format. The file name to use must be specified as parameter when launching the app, with the -f or --file tokens. The file must have the following structure:

{
  "sourceHost": "NOSQL_SERVER_ADDRESS_HERE",
  "sourcePort": "18091",
  "sourceName": "bucket-name",
  "sourceUsername": "bucket-user",
  "sourcePassword": "bucket-pwd",
  "sourceEntities": {
    // an example of virtual entity configured for Advanced data modeling
    "orders": {
      "dataModeling": [...],
      "type": "orders",
      "scope": "myscope"
    },
    // an example of virtual entity configured for Full table
    "DocumentType2": {
      "table": "CUSTOMERS",
      "schema": "MYSCHEMA",
      "type": "customers",
      "scope": "myscope"
    },
    // an example of virtual entity configured for Mapping
    "DocumentType3": {
      "mapping": {
        "id": "DRIVERID",
        "name": "DRIVERNAME",
        "surname": "DRIVERSURNAME"
      },
      "table": "DRIVERS",
      "schema": "MYSCHEMA",
      "type": "drivers",
      "scope": "myscope"
    },
    "DocumentType4": { ... }
  },

  "targetHost": "RDBMS_SERVER_ADDRESS_HERE",
  "targetPort": "1433",
  "targetName": "db-name",
  "targetUsername": "db-user",
  "targetPassword": "db-pwd",

  "oracle": {
    "tableKeys": {
      "CUSTOMERS.MYSCHEMA": ["ID"],
      "MYSCHEMA.DRIVERS": ["DRIVERID"]
    }
  }

  "copySourceEntitiesAtStartup": true,
  "maxItemsCountPerTransaction": 100,
  "maxTransactionCountPerIteration": 100,
  "maxMigrationItemsCountPerIteration": 1000
}

The parameters that refer to a source are the parameters that describe the connection to the NoSQL instance.

  • sourceHost: the host where the instance is reachable from;

  • sourcePort: the port which the instance is reachable from;

  • sourceName: the name of the database in the NoSQL instance;

  • sourceUsername: username of a privileged user in the instance;

  • sourcePassword: password of such user;

  • sourceEntities: document types that Gluesync is going to replicate to the target database.

The parameters that refer to a target are the parameters that describe the connection to the SQL instance.

  • targetHost: the host where the instance is reachable from;

  • targetPort: the port which the instance is reachable from;

  • targetName: the name of the target database in the SQL instance;

  • targetUsername: username of a privileged user in the instance;

  • targetPassword: password of such user;

Other configuration parameters are the following:

  • copySourceEntitiesAtStartup: boolean which indicates whether Gluesync should copy the whole tables contents when launched the first time;

  • maxItemsCountPerTransaction: the maximum number of events that should be processed simultaneously;

  • maxTransactionCountPerIteration: the maximum number of transactions that should be processed when simultaneously;

  • maxMigrationItemsCountPerIteration: defaults to 1000, it’s the size of each chunk of data being loaded by the initial snapshot process per each one of its threads. Change that value accordingly to your specific use case needs.

  • databasename (optional): refers to the name of the current Gluesync source database, for example, sybase for Sybase ASE or oracle for any Oracle DB. All lowercased;

    • tableKeys (optional): is the object that represents the key-value pair list of tables and its columns that compose your clustered index, format is SCHEMANAME.TABLENAME.

Looking for data modelling features or other options?

For more detailed configurations options, including the ability to perform data modelling, please have a look at the dedicated Data modelling section when sourcing from NoSQL.