Experts – Data Access
Blocks in this category are used to read information from a data source. For more information on this topic, take a look at the Data Queries page.
Read Block
The Read block can be obtained from the Data Access tab on the right of the designer. It is used to read data from a data source using a JSON Pointer. The JSON Pointer is automatically generated by the Data Access tab and stored in the Read block. To see the full query, you can right-click on the block and select “Show full Query”.
You can use right-click on the block to edit the JSON Pointer query.
More information on the data access concept of the FAIR DO Designer can be found on the Querying Data page.
More information on JSON Pointers can be found in RFC 6901 .
Advanced Queries
There are two separate blocks available for custom queries: Custom JSON Path and Custom JSON Pointer.
JSON Paths can be used to address multiple locations in the data source by using filters and wildcards. It should be used when you want to retrieve multiple entries from your data source. The Custom JSON Path block executes the provided JSON Path and returns an Array of results. Read more in this blog post about JSONPath . If you are only interested in a single element, you should use a JSON Pointer instead.
JSON Pointers are much simpler and address a single location in the data source. The query string is build by prefixing each key with the / character, independent of whether an object key or an array index is used. An example JSON Pointer might look like this: /blocks/2/type. Read more about JSON Pointers in the RFC 6901 . The Custom JSON Pointer block resolves the provided JSON Pointer and returns a single result.
Both blocks expect a text block as their only input. Refer to Data Queries for more information. For more complicated querying logic you can also use an empty placeholder function as the input for the blocks above.