3. Datafeed Design
With the data presented in the structure we require in the View, the Datafeeds can then retrieve from them.
Datafeeds are effectively stored SQL statements that retrieve from a Connection.
If you explore the Datafeed Builder in your own system, you’ll see that there are several different Datafeeds in there. Each has their own purpose, but the common thread is that they all select from their View.
This selection of the tables is in curly braces. This is a software functionality that we’ve added that means that it selects from the customers’ own Connection where applicable. For example, say we have a multi-tenanted environment for two SAFEQ Cloud customers. They would both retrieve data via the API, and would retrieve the same type of results e.g. same outputted tables.
How we handle this, is that we prefix those created tables with the GUID of that Connection. This means that we can house multiple customers under the same umbrella, but with the GUID prefix, it means you can only view that data if you are assigned to that Connection.
That’s why we wrap the tables in the curly braces, as it’s the way of retrieving the right data for that customer. If you wish to design your own datafeeds based on the your own existing Connection, you’ll need to bear that in mind.
The datafeeds are in this case, just selecting data from the View – but just in differing quantities.
One datafeed might just select everything, one might just select the filterable columns, and another a summarisation of the View’s data.
A key difference over older versions, is that the datafeeds are not the ones responsible for the time-based selection of data. All of that is handled in the View in the layer above the datafeed, which you will have learned at the end of the previous module.
This guide won’t serve as an exhaustive effort of explaining each different datafeed, as they all have their own nuances and should be explored by the user, should you wish to learn more.
With the datafeeds retrieving data from the Connection, the datasets can then get underway.