Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Accessing data in JSON Objects within DataMiner schema's

Through the database schema's page ("<appliance url>/dm/schema") it is possible to see the various tables and fields that can be queried. In certain cases it is possible that the table contain JSON objects identified as "jsonb" type fields. These are collections of additional fields.

To see what is contained in such an object in your DataMiner query use:

...

With "library_properties" being the object and "cqx_data.file_library" being the table namesname. This will show all columns & values in the object as a single string.
The result would then look like:

Alternatively you can also run:

...

With the SELECT statement referencing the object and the individual column name and the FROM statement the table name. To determine the item column name use the first option described above to see what items columns are contained within the JSON object.

...