Property description
The queryDefinitions property defines the behavior of created queries.
Minimal JSON
{
"queryKey": "",
"format": "",
"order": 0
}{
"key":"default",
...,
"queryDefinitions":[
{
"queryKey":"database",
"definition":"SET NOCOUNT ON\r\n\r\n\t\t\...",
"format":"json_lite",
"order":1,
"fields":[
{
"key":"object_key",
"isKey":true
},
{
"key":"parent_object_key",
"isParentKey":true
},
{
"key":"name",
"isName":true
},
{
"key":"description"
}
],
"options":{
}
}
],
"template":{
...
}
}Example taken from the core_sql_server package.
Nested properties
| Property | Description | Values | Mandatory |
|---|---|---|---|
queryKey | Key of the query that needs to be defined. | string | Yes |
format | Defines the query format. If left null, one of the following formats is applied automatically: json_lite, json | string | Yes |
order | Determines the execution sequence when multiple queries are defined. Queries extracting parent objects should run before child objects to maintain proper object hierarchy. | integer | Yes |
definition | Ingestion script defining how data is processed. The definition must be formatted in JSON. Examples based on data source type: CSV files: With headers (use header names directly): {Header 1}, {Header 2}., Without headers (use positional placeholders): $1,$2,$3 (these represent column numbers).JSON files: List of attribute keys, e.g., {attribute1}, {attribute2} . SQL Server: SQL queries written in JSON Lite format, in other words, written as a JSON string, with line breaks and tabs escaped (e.g., \r\n\t). | string | No |
fields | Array of fields/columns that will be ingested. Some columns can be assigned special tags that will be used as name, parent etc. in the following format: { “key”: “object_key”, “isKey”: true } Mandatory features for object type queries: Each query definition must include fields with the following tags: isKey: Marks field as the unique key/ID of the object., isName: Marks field as the name of the object. Object names are limited to 200characters., isParentKey: Marks field as the ID of the parent object. Mandatory features for relations queries: isFromKey: Marks field as the starting object in a relation., isRelationTypeKey: Marks field as a type of relation between objects. This tag is not used if the optionsproperty is used instead., isToKey: Marks field as the target object in a relation.TIP!Fields without tags should be linked to attribute types in mappings for proper identification. | array | No |
options | Specifies additional query options. When ingesting relation types that are not explicitly defined in the query definition, use this property to assign the relation type: "options": { "relationTypeKey": "package_key_relationTypeKey" } | json | No |