Scan files for metadata without moving them

Post Reply
PdFUser5000
Member
Posts: 120
Joined: Fri Jun 12, 2020 11:23 am

Scan files for metadata without moving them

Post by PdFUser5000 »

This is currently at an idea level and since i am a beginner I thought i'll ask here, if this is even possible.

I have a customer folder which has files in them. Some files (not all) have a private data tag added to them in a previous workflow.

When production planning starts i would like to scan files which are marked for production, pick up up the private data if it exists and send it to our order tracking system.

How can i pick up this data, if its in XMP format for example?
Can i read this data somehow without moving the files? (my first thought was using inject wildcard to copy the files and pick up the data, but since we have about 500 files a week coming in with different sizes, im not sure if switch can handle that kind of a workload on top of the other workflows we also are running)

Any feedback is appreciated.
saitok
Member
Posts: 63
Joined: Fri Apr 24, 2015 10:14 am
Location: Tokyo Japan

Re: Scan files for metadata without moving them

Post by saitok »

Hi,
If the private datas are stored as XML in the same folder and with the same name as the files, Switch can bind them and read the private datas.
But there shouldn't be the way to read the private datas(XML) without moving through any flow.
freddyp
Advanced member
Posts: 1008
Joined: Thu Feb 09, 2012 3:53 pm

Re: Scan files for metadata without moving them

Post by freddyp »

When files reach an end folder in a flow and the unique identifier is removed then all private data and datasets are lost. In other words, checking the private data is not even possible anymore. Even if you kept the unique identifier (that is an option on end folders) you would still need a script that scans all of the jobs in that folder and checks each job's metadata against the production planning trigger (doable, but not easy).

What you conceptually need is a place where you store the data and a place where you store the metadata with a link to the data. A database is certainly a candidate if there is a lot of data. If it is only small piece of private data you could place the files in a hierarchy where one of the folder names is the value of that private data, or you could attach the value to the file name. You can then use "Inject wildcard" to find the correct file. After all, a file structure is also a kind of database.

Another approach is to keep the jobs waiting in front of "Hold job" with a "Release condition" that either uses a database query to the production planning system, or that uses a script expression that reads some output from the planning system and checks whether it applies to itself or not. The jobs that are waiting in "Hold jobs" will regularly check their release condition, so in terms of the use of resources this is more intensive than the previous method, but not necessarily a problem.
Post Reply