Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
treysmithdev
Partner Ambassador
Partner Ambassador

JSON Definition Language

Does anyone know where the full JSON Definition Language (JDL) spec is? I'm trying to load some JSON files I have converted and it seems I need to generate a definition file as well, but I have not been able to find any documentation outside of the training slide.

Blog: WhereClause   Twitter: @treysmithdev
Labels (1)
1 Solution

Accepted Solutions
treysmithdev
Partner Ambassador
Partner Ambassador
Author

I was able to find the documentation in the embedded QDC documentation: Source > JSON > JSON Overview.

 

Here is the specific documentation I was looking for:

datasetName:

String name of the datasets.

Should not contain whitespace.

May contain underscore characters.

 

jsonRecordStructure:

JSON_OBJECT

 

jsonDatasetOrganization:

Should contain one of:

SINGLETON_JSON_VALUE

SEQUENCE_OF_JSON_VALUES

 

table:

Defines the name of a table to be extracted as well as the JSON-path for JSON values to be used for the table.

This directive may occur more than once in a single .hen file to define multiple tables for a single JSON dataset.

 

Example:

 

{

"datasetName": "tickets",

"jsonRecordStructure": "JSON_OBJECT",

"jsonDatasetOrganization": "SINGLETON_JSON_VALUE",

"tableDefinitions":

 [

  {

  "tableName": "store",

  "tableDriverSpecification": "$.store[*]",

  "fieldDefinitions":

   [

    {"fieldName": "ticketId", "fieldSpecificationString":    "$.store[*].id" },

    {"fieldName": "created_at", "fieldSpecificationString":  "$.store[*].created_at" },

    {"fieldName": "raw_subject", "fieldSpecificationString": "$.store[*].raw_subject" },

    {"fieldName": "tags", "fieldSpecificationString":        "$.store[*].tags" },

    {"fieldName": "tags2", "fieldSpecificationString":       "$.store[*].tags[*]" },

    {"fieldName":"firstCustomFieldValue","fieldSpecificationString":"$.store[*].customFields[0].value" },

    {"fieldName": "ticketJson", "fieldSpecificationString":  "$.store[*]" }

   ]

  },

 

  {

  "tableName": "store_tag",

  "tableDriverSpecification": "$.store[*].tags[*]",

  "fieldDefinitions":

   [

    {"fieldName": "ticketId", "fieldSpecificationString": "$.store[*].id" },

    {"fieldName": "tag", "fieldSpecificationString":      "$.store[*].tags[*]" }

   ]

  }

 ]

}

 

 

Source:

clipboard_image_2.png

Blog: WhereClause   Twitter: @treysmithdev

View solution in original post

1 Reply
treysmithdev
Partner Ambassador
Partner Ambassador
Author

I was able to find the documentation in the embedded QDC documentation: Source > JSON > JSON Overview.

 

Here is the specific documentation I was looking for:

datasetName:

String name of the datasets.

Should not contain whitespace.

May contain underscore characters.

 

jsonRecordStructure:

JSON_OBJECT

 

jsonDatasetOrganization:

Should contain one of:

SINGLETON_JSON_VALUE

SEQUENCE_OF_JSON_VALUES

 

table:

Defines the name of a table to be extracted as well as the JSON-path for JSON values to be used for the table.

This directive may occur more than once in a single .hen file to define multiple tables for a single JSON dataset.

 

Example:

 

{

"datasetName": "tickets",

"jsonRecordStructure": "JSON_OBJECT",

"jsonDatasetOrganization": "SINGLETON_JSON_VALUE",

"tableDefinitions":

 [

  {

  "tableName": "store",

  "tableDriverSpecification": "$.store[*]",

  "fieldDefinitions":

   [

    {"fieldName": "ticketId", "fieldSpecificationString":    "$.store[*].id" },

    {"fieldName": "created_at", "fieldSpecificationString":  "$.store[*].created_at" },

    {"fieldName": "raw_subject", "fieldSpecificationString": "$.store[*].raw_subject" },

    {"fieldName": "tags", "fieldSpecificationString":        "$.store[*].tags" },

    {"fieldName": "tags2", "fieldSpecificationString":       "$.store[*].tags[*]" },

    {"fieldName":"firstCustomFieldValue","fieldSpecificationString":"$.store[*].customFields[0].value" },

    {"fieldName": "ticketJson", "fieldSpecificationString":  "$.store[*]" }

   ]

  },

 

  {

  "tableName": "store_tag",

  "tableDriverSpecification": "$.store[*].tags[*]",

  "fieldDefinitions":

   [

    {"fieldName": "ticketId", "fieldSpecificationString": "$.store[*].id" },

    {"fieldName": "tag", "fieldSpecificationString":      "$.store[*].tags[*]" }

   ]

  }

 ]

}

 

 

Source:

clipboard_image_2.png

Blog: WhereClause   Twitter: @treysmithdev