Wie können wir Ihnen helfen?
< Zurück
Drucken

Query node – General

In the query editor, a query tree is created by capturing one or more query nodes. This must end in a unique target node.
Each node returns a result table that can be used in subsequent nodes.

 

 

Overview

Following query nodes can be defined:

Each node must always be assigned a unique ID.

 

Input format

Input to the query editor must be in YAML format.
YAML is a machine-readable markup language, but designed with a focus on human readability. However, it is also a superset of JSON and thus accepts that format as well.

 

Node type:

To delimit different nodes and specify their type, the document separator “– – –” is followed by a primary tag (starting with an exclamation mark “!”).
This example indicates that the following lines define a SapQuery node.

--- !SapQuery

 

Properties:

The properties of a node are defined as a mapping. A mapping consists of key-value pairs separated by a colon “:”.

Key: Value

 

Values can be texts (strings), other scalars but also lists or further mappings. Text values can also be defined over several lines. The following lines must then be indented by spaces. Line breaks are not interpreted as part of the value.

Key: Value
  defined over
  multiple lines
List:
  - Value1
  - Value2
BaseKey:
  SubKey:
    Key1: Value
    Key2: Value

 

Since YAML is a superset of JSON, lists and substructures can also be specified in JSON notation. The above example can thus alternatively be formulated as follows.

List: [Value1, Value2]
BaseKey: {SubKey: {Key1: Value, Key2: Value}}

 

Texts can also be specified with double and single quotes if they contain YAML special characters.

Path1: 'c:FolderFile'
Path2: "c:\Folder\File"

The YAML documentation has a listing of control characters that should be used in quote form or are only clearly part of the text if used in a text value. Especially with the asterisk “*” this has to be considered:

Select: *
Note: The file can be found on c:

The part “c:” could be interpreted as mapping and is therefore not valid.

 

Select: '*'
Note: 'The file can be found on c:'
Statement: SELECT * FROM Table

Since the asterisk occurs in the value of Statement in the middle, it is correctly recognized here as part of the text.

 

Comments can be marked by a hash “#”. These are separated from a key or value by spaces.

# Gültiger Kommentar
Key: # Kommentar vor dem Wert
  Value
  # Kommentar nach dem Wert

A comment can thus be placed at the beginning or at the end of a value, but not in between.

InvalidComment: A value
  containing a # character
  is invalid
Inhaltsverzeichnis