Replicating Data to a JSON Format File

With Syniti Data Replication, you can replicate relational data to a JSON format text file, useful as a data interchange format for integration with Javascript. JSON is currently supported as a target both in refresh and mirroring. Every session creates either a .ref or .mir file with the content of the replication. The files are in JSON format.

NOTE: Syniti DR also supports the JSON datatype when available in the supported relational databases. For example, if you are replicating from Oracle to SQL Server and the source table contains a fiel with a JSON datatype, that type will be correctly mapped and replicated to the SQL Server JSON datatype. If the JSON type does not exist, a VARCHAR type is used.

To define a target connection for JSON output:

  1.  In the Metadata Explorer, choose Targets, then Add New Connection from the right mouse button.

  2. In the Add Target Connection wizard, type a name for the connection and choose Files - JSON in the Database field.

  3. In the Set Connection String screen Output Folder field, enter the path to a directory to contain the output files and schema.

  4. Choose values for the following fields:

    Add Transactional Info: Choose Yes to include transactional information in the output for each record obtained from the database. This can be useful if replicating using mirroring from the source database.

    Use One File Per Group: False generates a single output file for each replicated table. True generates one file for all replicated tables in a group.

  5. You can leave the ExtendedProperties field blank.

  6. Click Next to view the Select Tables screen.
    If this is the first time you have created a JSON connection using the output folder defined above, the table display will be empty. You can add a representation of target tables after completing the wizard.

  7. Click Next to display the Actions screen,

  8. Optionally choose to continue with creating replications once the wizard is complete.

  9. Click Next to display the summary, then click Finish to create the connection.

  10. The next step is to add target output representation to the Metadata Explorer. This will be represented as relational tables.

Now you can set up replications from whichever source connection you have defined to the JSON target file.