Skip to main content

JSON Upload

Another way to map data systems with the Privacy Lock Data Mapping tool is to upload a JSON file. This requires that you have mapped the data schema of the data system in a JSON format. You can do this with an on premise deployment of the Data Mapping service. A JSON upload does not map the data system in real-time, but you can continually update your JSON upload for the same data system to track changes over time.

To create a meta model using JSON Upload, first select Create Meta Model

Data Mapping

From the Create Meta Model panel select Drop File/JSON Upload. A window will appear below where you can drag and drop a file or select a file from your computer. After you upload the file click ‘Create’.

Json upload

{
"name": "ExampleGraph",
"model": {
"nodes": [
{
"databaseName": "exampleDB",
"className": "exampleClass",
"fields": {
"field1": {
"schemaName": "exampleSchema",
"fieldName": "exampleField",
"primaryKey": true,
"type": "string",
"txHash": "0x1234567890abcdef",
"private": true,
"visible": true,
"accessOwner": true,
"accessGroup": false,
"accessWorld": false,
"encrypted": false,
"sharing": false,
"vendorIn": [],
"vendorOut": []
}
}
}
],
"edges": {
"exampleEdgeKey": [
{
"source": "exampleNode1",
"target": "exampleNode2",
"edgeName": "exampleEdge",
"data": {
"weight": 1
}
}
]
}
},
"signingPrivate": "examplePrivateKey"
}

Explanation of the JSON Structure

This JSON structure represents the schema for a database and includes metadata that helps map the structure as a Meta Model.

Here’s a breakdown of each section:

  • name: The name of your Meta Model. This will be used to identify the model.
  • model: This section contains the primary structure of your database:
    • nodes: Each node in the database represents a table or collection. For each node:
      • databaseName: The name of the database.
      • className: The name of the class that this node corresponds to.
      • fields: Each field within a node is described here:
        • schemaName: The schema that contains the field.
        • fieldName: The actual name of the field in the database.
        • primaryKey: Indicates if the field is a primary key.
        • type: The data type of the field (e.g., string, integer, etc.).
        • txHash: A unique identifier (e.g., a hash) for tracking changes in the database.
        • private, visible, accessOwner, accessGroup, accessWorld: These fields control the visibility and accessibility of the field, allowing you to define permissions.
        • encrypted, sharing: Indicate if the data should be encrypted or shared with external vendors.
        • vendorIn, vendorOut: Lists of vendors who can access or share data.
    • edges: The relationships between nodes (tables), represented as edges. Each edge connects a source node to a target node:
      • source: The node at the starting point of the edge.
      • target: The node at the end of the edge.
      • edgeName: The name of the relationship.
      • data: Additional data about the edge, such as weight or other metrics.
  • signingPrivate: A private key used for signing the data. This ensures that the data map is securely authenticated.

Step 3: Upload and Create Model

Once you have prepared your JSON file with the database schema and metadata, simply drag and drop the file into the Drop File area. The system will automatically process the data and map it to your Meta Model.

Benefits of JSON Upload

  • Quick Integration: Uploading a JSON file provides a faster method to create your Meta Model without the need for live database connections.
  • Customization: You can manually define your schema, control access permissions, and specify relationships (edges) between your database tables.
  • No Active Connection Required: If you prefer not to use a live database connection, uploading a JSON file is a great alternative. It allows you to map the data without the need for an active database connection.
  • By uploading the schema as a JSON file, you are defining your database's structure with additional metadata for more detailed mapping, making it easier to visualize and manage your data relationships.