Skip to main content
Question

How can I send batches , for example, 5 rows from the database (SQL non-Spatil) and send to a JSONTemplater and repeat this process?

  • Mar 15, 2023 6:01 PM UTC
  • 3 replies
  • 129 views

yamadar
Contributor
Forum|alt.badge.img+2

Hi,

 

I am new to the FME desktop.

 

I am reading data, for example, 10 rows from my database (SQL non-spatial) transforming it to JsonTemplater and sending it via HTTPCaller. It is working fine.

 

Therefore, there is a constraint to sending only batches of 100 rows per JSON file.

 

I have already tried the decelerator but the decelerator only delays the rows.

 

Could somebody help me?

 

Thanks

 

Raphael Yamada

3 replies

itsmatt
Celebrity
Forum|alt.badge.img+48
  • Celebrity
  • Mar 16, 2023 1:38 PM UTC

Check out the GroupBy option in the JSON templator

imageIf you can make sure each 'batch' of features have an attribute with a shared group id/name then the JSONTempator will process the features coming in in batches.

You'll also need one root feature per batch/group as well (this should also share the same group id as the batch of users


yamadar
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • Mar 17, 2023 10:17 PM UTC

Thanks,

You gave me a great idea to separate into groups and count. I used the transformer "GroupCounter" and it worked. Thanks for helping me.


itsmatt
Celebrity
Forum|alt.badge.img+48
  • Celebrity
  • Mar 20, 2023 7:09 AM UTC

Thanks,

You gave me a great idea to separate into groups and count. I used the transformer "GroupCounter" and it worked. Thanks for helping me.

Excellent solution, nice