Hi,
I need to assemble 2 jobs in a folder based on jobname and/or metadata.
Jobs are named like this File_<number>-Part<code>.pdf
File_1234-PartA.pdf
File_1234-PartB.pdf
File_5678-PartA.pdf
File_5678-PartB.pdf
As the job-identifier, I want to use the number in the filename. Sofar it's quite easy.
But... the part code must be unique.
So, if 2 jobs with exactly the same name arrive, they should not be assembled.
Any suggestions?
Robert
Assemble without duplicate
-
r.zegwaard
- Member
- Posts: 104
- Joined: Fri Jul 08, 2011 10:31 am
- Location: The Netherlands
Re: Assemble without duplicate
You can solve this by grouping on the job number and adding a condition on the Part code.
Extract the number (e.g., 1234) as your primary grouping key, then also extract the Part code (A, B, etc.) and use it to check uniqueness. Configure the Assemble step to:
Group by the extracted job number
Require exactly 2 files in the group
Add a condition that the Part code values must be different
If two files with the same name (e.g., both PartA) arrive, the group will either exceed the expected count or fail the uniqueness condition and therefore won’t be assembled.
This way only File_1234-PartA + File_1234-PartB will assemble, but duplicates will not.
monkey mart
Extract the number (e.g., 1234) as your primary grouping key, then also extract the Part code (A, B, etc.) and use it to check uniqueness. Configure the Assemble step to:
Group by the extracted job number
Require exactly 2 files in the group
Add a condition that the Part code values must be different
If two files with the same name (e.g., both PartA) arrive, the group will either exceed the expected count or fail the uniqueness condition and therefore won’t be assembled.
This way only File_1234-PartA + File_1234-PartB will assemble, but duplicates will not.
monkey mart
Re: Assemble without duplicate
You could group the files by the number in the filename, then check that each Part code is unique before assembling. If two files have the same job name and same Part code, skip the assembly to avoid duplicates.