Move Files

For a DataSet of type multiple, the following happens if a file is moved to a directory, assuming that a data directory holds all of the files. The files can be stored anywhere on the network that is accessible to FileWatcher.

Normal File Processing – Using Multiple DataSet

A comma separated file is copied into the data directory.

$MQ_COMMOND_DIR/catalogupload/prim
data
mcdata_20021107135621.csv
/	incoming
done
rejected

When copying is complete, write the trigger file:

/data
mcdata_20021107135621.csv
/incoming
list_20021107135621.txt
/done
/rejected

Note:

  • If your file is large, set up the inprogess flag, and name the file as list_20021107135621.txt.inprogress. After the file is completely written, rename it to list_20021107135621.txt.
  • The contents of the file list_20021107135621.txt should be:
/velosel/commondir/catalogupload/prim/data/
mcdata_20021107135621.csv

Watchdog wakes up and polls the incoming directory. It finds the list_20021107135621.txt file in the incoming directory. It processes the file, and then moves it to the done directory.

In the following example, the data file is not moved, because it does not trigger the Watchdog.

/data
      mcdata_20021107135621.csv
			/incoming
			/done
      					list_20021107135621.txt
			/rejected

The file has been successfully processed.

Duplicate File Processing

SD needed.

When copying is complete, write the trigger file:

		/data
     				mcdata_20021107135621.csv
			/incoming
     					list_20021107135621.txt
			/done
		/rejected

TIBCO MDM remembers the last 100 files that were processed, and does not allow the same file to be processed twice.

Watchdog moves the file into the rejected directory:

		/data
     					mcdata_20021107135621.csv
			/incoming
			/done
			/rejected
     					list_20021107135621.txt

If the system administrator decides to process this file, it is sufficient to copy the file back into the incoming directory under a different name. In this example, a -2 suffix is added (symbolizing version 2). The file processes normally.

			/data
     					mcdata_20021107135621.csv
			/incoming
     					list_20021107135621-2.txt
			/done
			/rejected
     					list_20021107135621.txt