Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

MergeRecord based on schema; only merge records of same schema

avatar
Explorer

My use-case is:

 

1) Have API credentials

2) Use UpdateAttribute to update (1) schema, (2) s3 bucket/location (my list of reports)

3) Query API endpoint for report

4) API endpoint paginates and gets more records

5) Call MergeRecord

6) Save to s3

 

Since 3, 4, 5, 6 are all the same, I'm re-using the processors like below (screenshot).  My problem is (5) MergeRecord will try to merge different schemas together, which is obviously a problem.

 

How can I restructure this?  I'd like to re-use processors as much as possible, but still be able to add more schemas as my needs evolve.

CRISSAEGRIM_0-1676668339630.png

 

1 ACCEPTED SOLUTION

avatar
Explorer

I used Correlation Attribute Name , setting it to `${schema.name}`, and it's working as expected.

 

Quote from documentation:

> If specified, two FlowFiles will be binned together only if they have the same value for this Attribute. If not specified, FlowFiles are bundled by the order in which they are pulled from the queue.

View solution in original post

1 REPLY 1

avatar
Explorer

I used Correlation Attribute Name , setting it to `${schema.name}`, and it's working as expected.

 

Quote from documentation:

> If specified, two FlowFiles will be binned together only if they have the same value for this Attribute. If not specified, FlowFiles are bundled by the order in which they are pulled from the queue.