# Data Hub Offloading - Configure Filter predicate for a Measurement value

**URL:** <https://community.cumulocity.com/t/data-hub-offloading-configure-filter-predicate-for-a-measurement-value/7752>\
**Category:** Forum\
**Tags:** datahub, cumulocity\
**Created:** [May 27, 2022, 1:48pm UTC](https://community.cumulocity.com/t/data-hub-offloading-configure-filter-predicate-for-a-measurement-value/7752 "2022-05-27T13:48:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Korbinian\_Butz](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/korbinian_butz/32/10473_2.png) [@Korbinian\_Butz](https://community.cumulocity.com/u/Korbinian_Butz)\
**Post date:** [May 27, 2022, 1:48pm UTC](https://community.cumulocity.com/t/data-hub-offloading-configure-filter-predicate-for-a-measurement-value/7752/1 "2022-05-27T13:48:27Z")

</div>

I would like to offload “all measurements of type X with a value \>= 30” via Data Hub. I’m struggling with value part.

I’ve tried using `'src."myfragmentmane."myseriesname"."value" >= 30'` in the predicate-filter step of the offloading job. However, this statement does not pass the validation.

Is this a supported Offloading predicate filter? What’s the proper syntax?

---

<div class="post-metadata">

**Author:** ![Melanie\_Monnereau](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@Melanie\_Monnereau](https://community.cumulocity.com/u/Melanie_Monnereau)\
**Post date:** [May 27, 2022, 2:11pm UTC](https://community.cumulocity.com/t/data-hub-offloading-configure-filter-predicate-for-a-measurement-value/7752/2 "2022-05-27T14:11:52Z")

</div>

Have a try with ‘c8y\_Temperature.T.value’ \> 30

---

<div class="post-metadata">

**Author:** ![Korbinian\_Butz](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/korbinian_butz/32/10473_2.png) [@Korbinian\_Butz](https://community.cumulocity.com/u/Korbinian_Butz)\
**Post date:** [May 30, 2022, 7:50am UTC](https://community.cumulocity.com/t/data-hub-offloading-configure-filter-predicate-for-a-measurement-value/7752/3 "2022-05-30T07:50:05Z")

</div>

Thanks, I’ve tried:

- src.“fragment”.“series”.“value”\>30
- src.fragment.series.value\>30
- fragment.series.value\>30
- “fragment.series.value”\>30

but no luck so far. Error message is a generic one: `CDHCBEE0441 - Preview computation failed: CDHCBEE0130 - Failed to execute CTAS Job.`

---

<div class="post-metadata">

**Author:** ![Korbinian\_Butz](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/korbinian_butz/32/10473_2.png) [@Korbinian\_Butz](https://community.cumulocity.com/u/Korbinian_Butz)\
**Post date:** [May 30, 2022, 7:56am UTC](https://community.cumulocity.com/t/data-hub-offloading-configure-filter-predicate-for-a-measurement-value/7752/4 "2022-05-30T07:56:58Z")

</div>

Melanie, I just saw your suggestion is using single- rather than double quotes. Can confirm: `'fragment.series.value'>30` passed the valdation. Thanks!

---

<div class="post-metadata">

**Author:** ![anon53547040](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@anon53547040](https://community.cumulocity.com/u/anon53547040)\
**Post date:** [May 30, 2022, 9:09am UTC](https://community.cumulocity.com/t/data-hub-offloading-configure-filter-predicate-for-a-measurement-value/7752/5 "2022-05-30T09:09:31Z")

</div>

Hi,  
I’m afraid that while you can make the query pass the validation using single-quotes, it doesn’t do what you want. By using single-quotes, you’re creating a string value that is compared against the value 30 – clearly not what you want!

Filtering on a per-fragment/series value is not properly supported (due to the nature of our internal data model in the operational store). There is a way to do it, but I won’t post the solution here as it is nothing I’d recommend to do. DM me if you really need it.

Filtering on custom attributes is supported and simple – the only thing to remember is that if the attribute you want to filter on is nested (i.e. a JSON Object itself), you need to prepend src. to the expression and then “drill” into the structure using dot notation (e.g., src.myObject.myAttribute \> 5)

Best, Tim

---

<div class="post-metadata">

**Author:** ![Korbinian\_Butz](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/korbinian_butz/32/10473_2.png) [@Korbinian\_Butz](https://community.cumulocity.com/u/Korbinian_Butz)\
**Post date:** [May 30, 2022, 9:58am UTC](https://community.cumulocity.com/t/data-hub-offloading-configure-filter-predicate-for-a-measurement-value/7752/6 "2022-05-30T09:58:59Z")

</div>

Thanks! I’ve also just realized that the predicate was accepted using single-quotes - however, it indeed didn’t filter what I desired. For the moment I was mainly interested if it is a supported use case or a matter of missconfiguration =\> which is answered now.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/system/32/31990_2.png) [@system](https://community.cumulocity.com/u/system)\
**Post date:** [August 28, 2022, 9:59am UTC](https://community.cumulocity.com/t/data-hub-offloading-configure-filter-predicate-for-a-measurement-value/7752/7 "2022-08-28T09:59:14Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
