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?

  • March 15, 2023
  • 3 replies
  • 75 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

virtualcitymatt
Celebrity
Forum|alt.badge.img+47
  • Celebrity
  • 2000 replies
  • March 16, 2023

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
  • 1 reply
  • March 17, 2023

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.


virtualcitymatt
Celebrity
Forum|alt.badge.img+47
  • Celebrity
  • 2000 replies
  • March 20, 2023

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