A newer version of this documentation is available.
View Latest (v2.0)

Gluesync SQL to NoSQL

Working with clustered indexes

Do you have a clustered index in a table or with no pre-defined primary keys? This option lets you perform a manual definition of fields that will be then used as unique row identifiers in your table(s). The same applies if you’ve got a clustered index configuration on one of your tables.

Here following the configuration snippet you can use and customize to sync your table with both a clustered index and a single primary key config, Gluesync will use these keys to compose your unique row identifier instead of looking for a single Primary Key:

{
  ...
  "databasename": {
    "tableKeys": {
      "SCHEMANAME.TABLENAME": ["id1", "id2"],
      "MYSCHEMA.OPENSEA": ["driver_unique_id"],
      "FOO.BAR": [
          "customer_name",
          "customer_surname",
          "customer_age",
          "customer_id"
        ]
    }
  },
  ...
}

Where:

  • databasename: 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: is the object that represents the key-value pair list of tables and its columns that compose your clustered index, format is SCHEMANAME.TABLENAME.