top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

File in a realtime system

+1 vote

I have a scenario where MANY flat files are created at the in real time(count of files is dynamic) I need to load only those files which are completely written

I need a script logic or anything in Informatica by which I can check if a file is being written or not

My Source is a JMS and the workflow creating files is a infinite run which reads data at real time and writes it to file.

Please help me out.

posted Mar 24, 2014 by Pooja Bhanout

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

+1 vote

This should give you a list of files you can obtain an write lock on.

Get-ChildItem *.* | foreach {
 try  {

    catch { }

If the application has finished writing to the file and closed it, you'll be able to get a write lock and the Try block will output that fileinfo object to the pipeline. If it's still open and being written to, the [IO.File]::OpenWrite($_.fullname) will throw an error, drop to the catch block (which does nothing), and move on to the next one.

answer Mar 24, 2014 by Shweta Singh
Similar Questions
0 votes

In a mapping we use delimited flat file having 3 columns.The column separated through comma. But i have a requirement that in between the column there is a column having 2 comma.So how should I process the column in the mapping?

0 votes

My source File Description:
In creating a mapping in Informatica designer where in my source is a fat file which is the collection of different types of data, as in customer details from customer table, his enrollment details from enrollment table and few more tables like this.
In this scenario how do I proceed in creating mapping and transformation to target?
If it were a single source file I define a simple source and target mapping.

+2 votes

The source file name in my project starts with a number for example 20070908abcd.csv. Informatica is not allowing to read the source in the designer and displays the following message:
The first character in this name cannot be a number.

Could you please let me know how to handle as many source files are of this format?

+4 votes

I have a scenario where my source file name will be coming from one db table I have to read that value and pass it in the value of Source File Name in Session properties.

Till now I have tried like I have created 2 sessions where the 1st session will read the db table where the source file name is stored and store it in one mapping variable and in post success variable assignment

I am assigning the mapping variable value to workflow variable and in the next main session I am trying to give the workflow variable in the session file name attribute .

But it is showing error like below

fail to expand variables in file field [$$WL_File].

How can I achieve this.

Please suggest some ideas.

Contact Us
+91 9880187415
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Karnataka INDIA.