Skip to main content

The concept of queries


The concept of queries means applying certain ports using a special kind of records with an aim of receiving an answer in the form of specific records.

The query block (LoopJoin) allows you to build queries and send them backwards, against the current of the normal direction of data flow. Such queries can go to blocks capable of handling them, such as database queries or indexes.

  1. Queries are quite normal data records, although usually composed of only a narrow fragment of the data used to build them, e.g. they contain only identifiers used later in the content of queries to the database.
  2. If necessary, queries are processed normally in the Map in place block - to do this, switch the drop-down field from Data to Queries in the block editor.
  3. Similarly, queries are registered by data preview blocks - they then have the prefix "QUERY" in the header of the query root. If there is a response correlated with the query, these records will be arranged together under a new artificial root connecting the query and responses.
danger

Queries cannot pass through queues.

  1. The query generated by the block registers in the context of the thread.
  2. Then, if fragments of the answer are set aside somewhere in the subgraph responsible for its delivery (for example, in the normalizer or in nested asynchronous queries), a mechanism for pushing out the buffered data is triggered.
  3. It should be additionally noted here that as a result of the operation of, for example, classification blocks, the appearance of rejections (e.g., validation), blocks that divide records into fragments (scissors), etc., responses may come by different routes, in fragments or not at all. The design of the processing engine ensures the correct result also in such situations.

See also​

Type length control

SQL editor

Mapping to/from XML and XSD