Skip to main content

Data Schema

Schema is a mapping of your data structure in InCountry storage. The InCountry Portal allows you to define the schema for execution of requests against regulated values. This guide will help you understand how to configure and manage your own schemas.

Schema Description

InCountry Data Schemas enable you to specify a correspondence between the data in your schema and the internal interpretation within the InCountry platform. Thanks to this feature, you don’t need to delve into the details of implementing a data schema on the InCountry platform. You can work with your existing structure seamlessly.

The Data Schema consists of:

  1. Correspondence between the field name in the client data model and the data model on the InCountry platform. If "Auto assign keys" is selected, then the InCountry platform will independently choose which match to assign.

  2. Data type for the selected field.

    The following data types are available: String, Integer, Decimal, Date, Time, Date&Time, Boolean, or JSON.

    The InCountry platform accepts string values in String; integer values in Integer; decimal values in Decimal; any valid JSON in the JSON field; date values in Date in yyyy-mm-dd format; time values in Time in hh:mm:ss format; datetime values in Datetime for example, in ISO format; boolean (true or false, 1 or 0) values in Boolean.

    note

    Please note that in case of update, the content of JSON field won't be merged or handled in any other way but replacing the whole value. If you need to modify the JSON, you should read the record, make all the changes and then save it.

  3. Encryption type for the selected field.

    The following encryption types are available: Unencrypted flexible search, Hashed exact search or Encrypted not searchable.

    Unencrypted flexible search means that the field will be indexed and will not be further hashed or encrypted at the record level. This allows you to search for records by this field using all possible operators (for more details, see Search).

    Hashed exact search means that the field will be hashed at the record level, allowing records to be searched only by exact value match.

    Encrypted not searchable means that the field will be encrypted at the record level and stored in a special encrypted object within the record. Search by this field is not possible.

Creating Schema

  1. In the left menu, expand the environment for which you want to create a schema, then click on the Schema menu item.

  2. You will be presented with an empty schema to fill in.

  3. On the Schema page, specify the following information:


    Under the Tables, specify the name of the table.

    Under the Fields, specify the following information:

    • Field name - specify the desired field name.
    • Data type - select the field type (String, Integer, Decimal, Date, Time, Date&Time, Boolean, or JSON).
    • Encryption - select the encryption type (Unencrypted flexible search, Hashed exact search or Encrypted not searchable). If Encrypted not searchable is selected, you must specify the JSON path where this field will be stored in the encrypted object inside the InCountry record.
    • Click the plus icon to add a new field and repeat the procedure.
  4. Click the plus icon to add a new table and repeat the procedure from step 3.

  5. When complete, click Update Schema.

  6. Enter the verification code and click Confirm.

The schema is saved. Further, you can edit or delete this schema.

info

Once you have defined the schema, you can further use fields instead of default record keys. Schema fields can be used in the following functionality:

  • Management of Web Services endpoints
  • Management of records with REST API

Editing Schema

  1. In the left menu, expand the environment where you want to modify the schema and click Schema menu item.
  2. Modify the schema as needed.
  3. When complete, click Update Schema.
  4. Enter the verification code and click Confirm.
Warning

Please, be aware there is no automatic data migration upon schema edit. Any breaking changes (field removal, changing field data type) you make during editing may affect your stored data.

Deleting Schema

If you no longer need the schema, you can delete it. After the removal, you cannot use it for further data management on the InCountry platform.

  1. In the left menu, expand the environment where you want to modify the schema and click Schema menu item.
  2. On the Schema page, click Delete Schema.
  3. Enter the verification code and then click Delete once again.