Hi,
Let’s I have below data model created in FDM and there are 2 types Device and Sensor. Device is referring to other type Sensor.
Device
- name:String
- sensors:[Sensor]
Sensor
- name:String
- timestamp: Timestamp
- value: Float
I have populated the data through transformation in this model. I wanted to check on how to get the latest timestamp and value for particular device and sensor through FDM GraphQL query.
Example:
Device : d1
Sensor:
name: s1
timestamp: 2023-01-01 01:00
value: 10.0
name: s1
timestamp: 2023-01-02 01:00
value: 20.0
name: s1
timestamp: 2023-01-03 01:00
value: 30.0
I am expecting to latest timestamp as 2023-01-03 01:00 and value as 30.0