Thursday, July 7, 2016

Automatically trigger the process when we place the file in specific location

Scenario:
Integration team decided to place a file in particular location and they asked ETL team to pick that file and load into the Target data store.
They are not sure when they are going to place that file. But ETL team need to pick that file immediately once they place the file in that location and process it.

File Name: Sample.txt
File Type : Fixed Length File

Assumptions:
Aware of loading data from File (Fixed length) to Table using ODI

Step 1:
Follow my previous post (Fixed length File Load)

Step 2:
Create a package -- Drag and Drop ODIWaitFile (tool) from toolbox.

Step 3:
Select ODIWaitFile and go to properties.
Directory : Specified intergation team provided file Location (example : C:\Sample_files)
Filename Mask : Sample.txt
For remaining properties leave it as it is

Step 4:
Drag and Drop Mapping into your package. Select "Ok" and connect to ODIWaitFile and Mapping with that connector

Step 5:
Drag and Drop ODIFileMove (tool) from toolbox.
Filename : (C:\Sample_files\Sample.txt) Specify complete file location with file name)
Target File : Specify where you want to move that file (for Example : C:\Sample_files\ZIP)
For remaining properties leave it as it is

Step 5:
Select "Ok" and connect to ODIFileMove from Mapping and again connect ODIFileMove to ODIWaitFile as below:


It seems to be cyclic that means it is infinity loop. Whenever we place a file it pick it up and load into target data store and move into another folder and wait for next file

Step 6:
We need to execute only for one time
Completed Successfully !!!!!



No comments:

Post a Comment