dynamic file generation

Upload: etlvmahesh

Post on 04-Apr-2018

225 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/31/2019 Dynamic File Generation

    1/24

    Tuesday, August 26, 2008

    How to generate target file names dynamically from themapping?

    I've seen this question many times in the Devnet forums very recently. I thought I willjust elaborate the PowerCenter documentation here.

    In order to generate the target file names from the mapping, we should make use of the

    special "FileName" port in the target file. You can't create this special port from the

    usual New port button. There is a special button with label "F" on it to the right most

    corner of the target flat file when viewed in "Target Designer".

    Below two screen-shots tell you how to create the special port in your target file.

    http://radhakrishnasarma.blogspot.in/2008/08/how-to-generate-target-file-names.htmlhttp://radhakrishnasarma.blogspot.in/2008/08/how-to-generate-target-file-names.htmlhttp://radhakrishnasarma.blogspot.in/2008/08/how-to-generate-target-file-names.htmlhttp://radhakrishnasarma.blogspot.in/2008/08/how-to-generate-target-file-names.html
  • 7/31/2019 Dynamic File Generation

    2/24

    Once this is done, the job is done. When you want to create the file name with a

    timestamp attached to it, just use a port from an Expression transformation before thetarget to pass a value of Output Port with expression

    $$FILE_NAMEto_char(sessstarttime, 'YYYYMMDDHH24:MISS')'.csv'.

    Please note that $$FILE_NAME is a parameter to the mapping and I've used

    sessstarttime because it will be constant through out the session run.

    If you use sysdate, it will change if you have 100s of millions of records and if the session

    may run for an hour, each second a new file will get created.

    Please note that a new file gets created with the current value of the port when the port

    value which maps to the FileName changes.

    http://1.bp.blogspot.com/_qaWvZjF0d2c/SLTdzy43mNI/AAAAAAAAAMw/t7s0bq_pGdc/s1600-h/File_Name_Port_post.JPGhttp://1.bp.blogspot.com/_qaWvZjF0d2c/SLTdz-FPwxI/AAAAAAAAAMo/vGf64eL7KuE/s1600-h/File_Name_Port_pre.JPGhttp://1.bp.blogspot.com/_qaWvZjF0d2c/SLTdzy43mNI/AAAAAAAAAMw/t7s0bq_pGdc/s1600-h/File_Name_Port_post.JPGhttp://1.bp.blogspot.com/_qaWvZjF0d2c/SLTdz-FPwxI/AAAAAAAAAMo/vGf64eL7KuE/s1600-h/File_Name_Port_pre.JPG
  • 7/31/2019 Dynamic File Generation

    3/24

    We'll come to the mapping again. This mapping generates two files. One is a dummy file

    with zero bytes size and the file name is what is given in the Session properties under

    'Mappings' tab for target file name. The other file is the actual file created with the

    desired file name and data.

    When you have different sets of input data with different target files created, use the

    same instance, but with a Transaction Control transformation which defines the

    boundary for the source sets. A demonstration of this is available in the PowerCenter

    documentation.

    Its an amazing way to acheive my requirement.

    But the only thing I kinda dont like is it creates 2 files.

    Is there a way to get rid of the file which is mentioned in the session prop-

    Mapping tab

    Target file. I tried to make it empty but doesn't work.

    Let me know if there is a way to get jus one file

    October 30, 2008 12:45 PM

    I'm happy that my blog was helpful to you. Unfortunately, there is no way to

    make the dummy file disappear. It is the way this FileName port works.

    Whenever tha value changes on this port, it creates a file. To avoid the

    frustration, I use a post-session command to remove the dummy file. This way,after your session run, you wil only see one file.

    By the way, are you not getting the empty file. What do you mean by "I tried to

    make it empty"?

    Sashisaid...

    I mean, in the Session - mapping Properties, we need to specify the Output File

    name for the target.

    I tried to leave it empty which we could nt do.

    So let me know what should be written in the post session.

    http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1225395900000#c8910503301016457900http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1225395900000#c8910503301016457900http://www.blogger.com/profile/02493427156250551391http://www.blogger.com/profile/02493427156250551391http://www.blogger.com/profile/02493427156250551391http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/02493427156250551391http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/02493427156250551391http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1225395900000#c8910503301016457900
  • 7/31/2019 Dynamic File Generation

    4/24

    Thanks..

    October 31, 2008 6:41 AM

    Sashisaid...

    I found a different way to do this.

    Edit the Workflow and add variable $$NEWVARIABLE.

    Then in the assignment, assign the defined variable, $$NEWVARIABLE =

    Concat(Concat('test_',TO_CHAR(trunc(sysdate),'yyyy_mm_dd')),'.xml')

    Now after the Start, have the assignment and whatever session you may want.

    In the Target file Name in session properties, we need to put $$NEWVARIABLE.

    This way you will have just one file.

    October 31, 2008 12:54 PM

    Dorsetsaid...

    This is great info to know.

    November 11, 2008 4:06 AM

    chaitanyasaid...

    Hi Sarma,

    Can i add Header and Footer for those Mulitple files generated.

    December 17, 2008 9:49 PM

    Radhakrishna Sarmasaid...

    Yes Chaitanya, you can.

    http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1225460460000#c4150396086692451230http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1225460460000#c4150396086692451230http://www.blogger.com/profile/02493427156250551391http://www.blogger.com/profile/02493427156250551391http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1225482840000#c4352831519095971330http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1225482840000#c4352831519095971330http://jessinsurance.blogspot.com/http://jessinsurance.blogspot.com/http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1226405160000#c9135004109090250073http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1226405160000#c9135004109090250073http://www.blogger.com/profile/10369909846387180897http://www.blogger.com/profile/10369909846387180897http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1229579340000#c3532673268059878898http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1229579340000#c3532673268059878898http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/10369909846387180897http://jessinsurance.blogspot.com/http://www.blogger.com/profile/02493427156250551391http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/10369909846387180897http://jessinsurance.blogspot.com/http://www.blogger.com/profile/02493427156250551391http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/10369909846387180897http://jessinsurance.blogspot.com/http://www.blogger.com/profile/02493427156250551391http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/10369909846387180897http://jessinsurance.blogspot.com/http://www.blogger.com/profile/02493427156250551391http://www.blogger.com/profile/15531516106199587979http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1229579340000#c3532673268059878898http://www.blogger.com/profile/10369909846387180897http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1226405160000#c9135004109090250073http://jessinsurance.blogspot.com/http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1225482840000#c4352831519095971330http://www.blogger.com/profile/02493427156250551391http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1225460460000#c4150396086692451230
  • 7/31/2019 Dynamic File Generation

    5/24

    Cheers

    Sarma.

    December 18, 2008 6:08 PM

    Adarsh said...

    Hi, this is very good feature..but i can't see the "File" option in my warehouse

    designer on the flat file. Informatica version is 7.1.3, has it come in the later

    version.

    Thanks,

    Adarsh

    January 12, 2009 8:49 AM

    Radhakrishna Sarmasaid...

    I have stopped using 7.x for more than 2 years now, I think we don't have this

    option in 7.x, not sure though. BTW, I have a very vague feeling that I used this

    7.1.4.

    Cheers

    Sarma.

    January 12, 2009 7:01 PM

    Adarsh said...

    That seems to be the only probable reason i am not able to see it..Anyways

    Thanks Sarma...January 14, 2009 12:29 PM

    Satishsaid...

    http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1229652480000#c6698705594279501972http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1229652480000#c6698705594279501972http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1231778940000#c1945906187254549515http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1231778940000#c1945906187254549515http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/15531516106199587979http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1231815660000#c6574388252805978405http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1231815660000#c6574388252805978405http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1231964940000#c8098148915769205387http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1231964940000#c8098148915769205387http://www.blogger.com/profile/00022277201558947553http://www.blogger.com/profile/00022277201558947553http://www.blogger.com/profile/00022277201558947553http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/00022277201558947553http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/00022277201558947553http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/00022277201558947553http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/00022277201558947553http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1231964940000#c8098148915769205387http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1231815660000#c6574388252805978405http://www.blogger.com/profile/15531516106199587979http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1231778940000#c1945906187254549515http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1229652480000#c6698705594279501972
  • 7/31/2019 Dynamic File Generation

    6/24

    hi..

    i need to create only one file using filename port ..but that file shuld be dynamic

    how to to do..that..in informatica..

    January 21, 2009 6:08 AM

    Radhakrishna Sarmasaid...

    Hi Satish,

    Yes possible. If you look through the method described by Sashi in the comments

    section of this article, you will know how to do it.

    CheersSarma.

    January 21, 2009 5:52 PM

    Anonymous said...

    yes but that is not working..for me..

    When i used the Filename port of the target defention the data in the outpufile

    started to display in sequential fashion not row by row.is there any other settings

    to be done..

    When i remove the filename port or dont pass to target data comes row by row

    January 28, 2009 5:23 AM

    Mikaelsaid...

    Hey Sarma,

    Ive done the procedure like you said but my mapping isnt creating 1 file per

    location.

    Ive followed the INFA tutorial on "Creating target flat files by transaction", and i

    couldnt make step 2 (Expression transformation. Determines when a new city

    http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1232546880000#c5456075606506983258http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1232546880000#c5456075606506983258http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/15531516106199587979http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1232589120000#c38747273162849152http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1232589120000#c38747273162849152http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1233148980000#c5626998934678417394http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1233148980000#c5626998934678417394http://www.blogger.com/profile/16455309497174505658http://www.blogger.com/profile/16455309497174505658http://www.blogger.com/profile/16455309497174505658http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/16455309497174505658http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/16455309497174505658http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/16455309497174505658http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1233148980000#c5626998934678417394http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1232589120000#c38747273162849152http://www.blogger.com/profile/15531516106199587979http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1232546880000#c5456075606506983258
  • 7/31/2019 Dynamic File Generation

    7/24

    appears in a row and passes an integer to the New City port of the Transaction

    Control transformation. ???Passes 0 by default and passes 1 when the row

    contains a new city.??? ) work. Could you please guide me thru ??

    February 4, 2009 9:12 AM

    Radhakrishna Sarmasaid...

    Hi Mikael,

    Can you tell me what all transformations you have from source till the target? The

    method I described and the ones in the Informatica help, both - working fine for

    me.

    Cheers

    Sarma.

    February 4, 2009 9:16 AM

    Mikaelsaid...

    Sure !

    im using one source attached on a source qualifier.Then a made a Group

    objectto group all my records by city. then i created an expression where i

    created an FLAG port that should be 0 when previous record is equal or 1 if its

    different.

    Then i used de transaction control where i check the flag content and commit the

    record.

    my question is the validating 1 or 0 on teh expression... whats the best way to do

    it?

    February 4, 2009 9:22 AM

    Radhakrishna Sarmasaid...

    http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1233767520000#c7070934415361480092http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1233767520000#c7070934415361480092http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/15531516106199587979http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1233767760000#c4571230796869250144http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1233767760000#c4571230796869250144http://www.blogger.com/profile/16455309497174505658http://www.blogger.com/profile/16455309497174505658http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1233768120000#c4845011140638851835http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1233768120000#c4845011140638851835http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/16455309497174505658http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/16455309497174505658http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/16455309497174505658http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/15531516106199587979http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1233768120000#c4845011140638851835http://www.blogger.com/profile/16455309497174505658http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1233767760000#c4571230796869250144http://www.blogger.com/profile/15531516106199587979http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1233767520000#c7070934415361480092
  • 7/31/2019 Dynamic File Generation

    8/24

    Hi Mikael,

    You should have a sorter transformation before the expression. Then you will be

    able to say that all the records of the current city are processed and the new city

    comes now.

    Let us assume City is the input port to the expression.

    Your expression after the sorter can have something like this as an output port.

    v_new_City (Integer Variable port)---> iif(v_prev_city = City, 0, 1)

    v_prev_city (String Variable port) ---> City

    O_new_city (Integer Output port) ----> v_new_city

    You take the O_new_city value to the next transformation after expression.

    Note that the order of the variable ports should be like declared above because,

    the previous city values should be stored after the new city value is checked.

    I hope now it helps.

    ThanksSarma.

    February 4, 2009 9:24 AM

    Mikaelsaid...

    Sarma your are genius ! !

    It worked perfect !

    Now,i have another challenge for you.

    In another mapping i need to have 10k of record MAX in a flat file. If i have more

    than 10k, i need to create a new file..

    Any ideas?

    http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1233768240000#c5783854525497973948http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1233768240000#c5783854525497973948http://www.blogger.com/profile/16455309497174505658http://www.blogger.com/profile/16455309497174505658http://www.blogger.com/profile/16455309497174505658http://www.blogger.com/profile/16455309497174505658http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1233768240000#c5783854525497973948
  • 7/31/2019 Dynamic File Generation

    9/24

    February 4, 2009 9:51 AM

    Radhakrishna Sarmasaid...

    Hi Mikael,

    Very simple if you can follow what I've suggested earlier. You don't need a sorter

    in this case. In the expression, you just keep incrementing a variable and change

    the value of the Filename port here when the counter is 10000.

    v_counter = iif(v_counter = 0, 1, v_counter+1)

    v_File_Name = iif(mod(v_counter, 10000) = 0, 'File_Name_'||v_counter,v_File_Name)

    Cheers

    Sarma.

    February 5, 2009 12:56 AM

    Mikaelsaid...

    HEY SARMA !

    Thx again for the help, but it isnt workig.

    Im getting "WRT_8004 Writer initialization failed [Error opening session

    output file

    [/home/infrmtca/Informatica/PowerCenter8.6.0/server/infa_shared/TgtFiles/]

    [error=Is a directory]]. Writer terminating.

    WRT_8064 Error opening session output file

    [/home/infrmtca/Informatica/PowerCenter8.6.0/server/infa_shared/TgtFiles/][errno=21] [error=Is a directory]"

    Another thing...

    For each file that reaches 10k records i need to put an _1, _2 and on and on...

    http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1233769860000#c6344830496990475944http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1233769860000#c6344830496990475944http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/15531516106199587979http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1233824160000#c4016381415782898363http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1233824160000#c4016381415782898363http://www.blogger.com/profile/16455309497174505658http://www.blogger.com/profile/16455309497174505658http://www.blogger.com/profile/16455309497174505658http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/16455309497174505658http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/16455309497174505658http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1233824160000#c4016381415782898363http://www.blogger.com/profile/15531516106199587979http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1233769860000#c6344830496990475944
  • 7/31/2019 Dynamic File Generation

    10/24

    Is that the same logic?

    BR

    February 5, 2009 4:12 AM

    Radhakrishna Sarmasaid...

    If you could apply a bit of logic, it isn't that difficult.

    v_File_Name = iif(v_counter = 1, 'File_Name_1', iif(mod(v_counter, 10000) =

    0, 'File_Name_'||v_counter/10000, v_File_Name))

    This may not be the exact solution, but if you play around with this. You will beable to manage.

    Cheers

    Sarma.

    February 5, 2009 6:10 PM

    Sandeepsaid...

    RK,

    Is there a way to create tables dynamically using informatica 811 sp2?

    What is the file size limitation while creating them dynamically?

    February 20, 2009 10:21 AM

    Radhakrishna Sarmasaid...Hi Sandeep,

    You can not create tables dynamically. There are ways to do that, but I would

    always discourage design that demands this.

    There is no file size limitation, that I know of for dynamically created files.

    http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1233835920000#c1429825314203982362http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1233835920000#c1429825314203982362http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/15531516106199587979http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1233886200000#c1007527629208643960http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1233886200000#c1007527629208643960http://www.blogger.com/profile/03047882400786791155http://www.blogger.com/profile/03047882400786791155http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1235154060000#c5418065477689002711http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1235154060000#c5418065477689002711http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/03047882400786791155http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/03047882400786791155http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/03047882400786791155http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/15531516106199587979http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1235154060000#c5418065477689002711http://www.blogger.com/profile/03047882400786791155http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1233886200000#c1007527629208643960http://www.blogger.com/profile/15531516106199587979http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1233835920000#c1429825314203982362
  • 7/31/2019 Dynamic File Generation

    11/24

    Cheers

    Sarma.

    February 22, 2009 7:18 PM

    Naresh Acharysaid...

    Hi Radhlrishna,

    I have a requirement of creating target files with dynamic names. I followed ur

    article. Its really helped me alot. but, I need to have the header and trailer in the

    target excel file with the dynamic file name. Can I have both the options? If u had

    faced this kind of scenario pls let me know, How it can be achieved?

    March 23, 2009 10:48 PM

    Radhakrishna Sarmasaid...

    Hi Naresh,

    It is quite simple because you will only be treating the filename contents of the

    expression port before the target as any other port.

    For eg: In the expression before target, I would create a flag like this.

    v_flag (variable, small int) --> iif(v_flag = 0, 1, -1)

    v_filename (variable, string) --> (based on your requirement)

    v_detail (variable, string) --> (driven by your business needs)

    O_Line (output port, string) --> iif(v_flag = 1, v_file_name||chr(10)||v_detail,v_detail)

    I hope the above expression ports satisfy your requirement, unless your target

    definition is defined with columns in it.

    In that case, I would follow the same approach, but while mapping to the first

    http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1235359080000#c1537422259929108577http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1235359080000#c1537422259929108577http://www.blogger.com/profile/14736341379465400774http://www.blogger.com/profile/14736341379465400774http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1237873680000#c5805870253001384851http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1237873680000#c5805870253001384851http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/14736341379465400774http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/14736341379465400774http://www.blogger.com/profile/15531516106199587979http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1237873680000#c5805870253001384851http://www.blogger.com/profile/14736341379465400774http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1235359080000#c1537422259929108577
  • 7/31/2019 Dynamic File Generation

    12/24

    target column, I would use the O_Line method to precede the first record with

    the file name value.

    I have not tried it out but I'm confident that it works. Please let me know if you

    are stuck anywhere.

    Cheers

    Sarma.

    March 23, 2009 10:56 PM

    Ramsaid...

    Hi Sarma,

    Thanks for your great explanation..

    For me the only problem is , the file has been generated in sequential fashion not

    row by row.is there any other settings to be done.?

    Please help me on this?

    July 8, 2009 9:41 AM

    Radhakrishna Sarmasaid...

    Hi Ram,

    I don't think there should be any problem with the format of the file. You should

    see every line with a carriage return at least. Do not link any port to the target

    FileName port and see the target file. Does it have data properly?

    CheersSarma.

    July 8, 2009 7:12 PM

    Anonymous said...

    http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1237874160000#c7861457733930777612http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1237874160000#c7861457733930777612http://www.blogger.com/profile/13691764392631475068http://www.blogger.com/profile/13691764392631475068http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1247071271026#c4387819719214742360http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1247071271026#c4387819719214742360http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/15531516106199587979http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1247105557266#c8187194222957393815http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1247105557266#c8187194222957393815http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/13691764392631475068http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/13691764392631475068http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/13691764392631475068http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1247105557266#c8187194222957393815http://www.blogger.com/profile/15531516106199587979http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1247071271026#c4387819719214742360http://www.blogger.com/profile/13691764392631475068http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1237874160000#c7861457733930777612
  • 7/31/2019 Dynamic File Generation

    13/24

    Hello Radhakrishna,

    This information you posted is very useful. Thank you. Since this is an older post,

    I'm not sure if you're still replying here, I have a question. I'm working on

    Informatica v.8.5. I'm using indirect file list as my source and I want one target

    file to be created per source file. I'm also generating fileID per source file in EXP

    transformation using the logic

    IIF(v_filename=filename, v_fileID, v_fileID+1) then I assign v_filename =

    filename. When I'm trying to generate separate target file per source file, I only

    am getting one target file. Here is the logic I'm using:

    IIF(filename=v_filename, $$Filename, v_fileID||'_test.dat')

    $$Filename is a mapping variable with initial value 1_test.dat

    Can you please point out what I'm missing?

    January 8, 2010 12:50 PM

    Radhakrishna Sarmasaid...

    Hi Anonymous,

    It would've been easier for me if you had left your email address or something. I

    have prepared screen shots for you. Let me know and I will send you an email.

    Cheers

    Sarma.

    January 10, 2010 7:01 PM

    viswanathsaid...

    Hi Radhakrishna Sarma,

    Thanks a lot for how to create FILED_NAME. I tried this but it is not working.

    File having data as below.:

    visu,b,c

    http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1262983853650#c3068140883779192464http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1262983853650#c3068140883779192464http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/15531516106199587979http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1263178873864#c3045191140428015505http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1263178873864#c3045191140428015505http://www.blogger.com/profile/18182590512806144827http://www.blogger.com/profile/18182590512806144827http://www.blogger.com/profile/18182590512806144827http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/18182590512806144827http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/18182590512806144827http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1263178873864#c3045191140428015505http://www.blogger.com/profile/15531516106199587979http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1262983853650#c3068140883779192464
  • 7/31/2019 Dynamic File Generation

    14/24

    x,y,z

    a,b,c

    x,y,z

    a,b,c

    x,y,z

    a,b,c

    x,y,z

    a,b,c

    x,y,z

    The outputs are create as below

    1) visu (it is having all the records)

    2) x (it is having only one record as x,y,z)

    3) a (it is having only one record as a,b,c)

    but in 2 file (x)it should have 5 records and in file 3 also it should have 4 recrods.

    In the mapping i have

    sq->exp->trascation control(properties:TC_CONTINUE_TRANSACTION) ->trg.

    let me know is there any problem in my mapping.

    February 22, 2010 5:07 AM

    viswanathsaid...

    Hi Radhakrishna Sarma,

    Below are the questions

    1) You have any idea how to call x workflow from y workflow.

    2)Before run the the workflow X we need to check atleast one row should be there

    in table AAA. If there is no row then we the workflow should not run it has to wait

    until anyone entered row in table AAA.

    February 22, 2010 5:11 AM

    viswanathsaid...

    http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1266844061952#c369652836652498523http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1266844061952#c369652836652498523http://www.blogger.com/profile/18182590512806144827http://www.blogger.com/profile/18182590512806144827http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1266844305185#c3349968641730387827http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1266844305185#c3349968641730387827http://www.blogger.com/profile/18182590512806144827http://www.blogger.com/profile/18182590512806144827http://www.blogger.com/profile/18182590512806144827http://www.blogger.com/profile/18182590512806144827http://www.blogger.com/profile/18182590512806144827http://www.blogger.com/profile/18182590512806144827http://www.blogger.com/profile/18182590512806144827http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1266844305185#c3349968641730387827http://www.blogger.com/profile/18182590512806144827http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1266844061952#c369652836652498523
  • 7/31/2019 Dynamic File Generation

    15/24

    Hi Radhakrishna Sarma,

    Below are the questions

    1) You have any idea how to call x workflow from y workflow.

    2)Before run the the workflow X we need to check atleast one row should be there

    in table AAA. If there is no row then we the workflow should not run it has to wait

    until anyone entered row in table AAA.

    February 22, 2010 5:11 AM

    Animeshsaid...

    Hi,

    I have a requirment in which i have to create a file for each Employname. I will

    explain the complete requirment with the following example.

    I am having a flat file and its a source. now i contains the following information

    First_name, Email

    Abc [email protected]

    XYZ [email protected]

    Pqr [email protected] [email protected]

    Pqr [email protected]

    Pqr [email protected]

    Abc [email protected]

    Abc [email protected]

    Abc [email protected]

    Now what is require is i need to generate target filesin such a manner that for

    every First_name there should be one file geberated and in that file it should

    contains the all record for that first_name. For the above source records theoutput should be in such a manner.

    First file with name Abc

    Abc [email protected]

    Abc [email protected]

    Abc [email protected]

    http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1266844305880#c7754624303697873115http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1266844305880#c7754624303697873115http://www.blogger.com/profile/07092744754427449899http://www.blogger.com/profile/07092744754427449899http://www.blogger.com/profile/07092744754427449899http://www.blogger.com/profile/07092744754427449899http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1266844305880#c7754624303697873115
  • 7/31/2019 Dynamic File Generation

    16/24

    Abc [email protected]

    Second File with name Pqr

    Pqr [email protected]

    Pqr [email protected]

    Pqr [email protected]

    Pqr [email protected]

    Third file with name XYZ

    XYZ [email protected]

    for achiveing this task

    I am using the following mapping

    Source -----> SQ----> Sorter ----> EXP ---> Tansaction control ----> Target

    In sorter I am just sorting the names based on first_name and distinct is not

    selected.

    IN EXP i am checking the current and previous record and storing in

    new_first_name variable and then in another port i am checking the logic, so that

    when ever the name changes i wil get

    NEWFIELD = iif(new_first_name = First_Name,0,1).

    In transaction control i am checking

    IIF(NEWFIELD=1,TC_COMMIT_AFTER)

    And then linking to the target. when i execute this i am getting three files

    generated and with the correct name also the default file is also generated with

    zero byte. But my problem is i am getting only one records in the files as in the

    example there are four records so four records should come in the target.

    Please let me know if i am missing some property or any thing in the transaction

    control transformation

    Regards

    Animesh

  • 7/31/2019 Dynamic File Generation

    17/24

    April 12, 2010 3:37 AM

    Anonymous said...

    Thanks Radhakrishna. I had a similar requirement but need FTP file to a

    different location. I guess the file port option cannot be used with FTP

    connections. It works when the file is generated locally, but fails when I use FTP.

    Any suggestions on how to go about this? (pls note that unix scripting is not an

    option. It is a secure FTP and changes must be done from within the

    mapping/session itself) Thanks for your help.

    June 29, 2010 8:53 AM

    Radhakrishna Sarmasaid...

    I don't think there is any other option for FTP.

    June 30, 2010 5:26 PM

    koustuvasaid...

    hi sir

    i have mix up data means it contain distinct record as well dup records.i want to

    generate file dynamically as result how distinct records are there it will create tht

    much of target file ,and plz desc how to generate tht coz am failed to achieve it.

    Thanks

    koustuva

    [email protected]

    July 12, 2010 11:53 AM

    Anonymous said...

    Hi RadhaKrishna,

    I am doing one project in Informatica powercenter 8.6. In that I am trying to use

    http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1271068640825#c5465942984678909963http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1271068640825#c5465942984678909963http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1277826791336#c1314815365831566171http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1277826791336#c1314815365831566171http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/15531516106199587979http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1277943965473#c968077054198852508http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1277943965473#c968077054198852508http://www.blogger.com/profile/04099971508859565039http://www.blogger.com/profile/04099971508859565039http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1278960802119#c8206402562815894675http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1278960802119#c8206402562815894675http://www.blogger.com/profile/04099971508859565039http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/04099971508859565039http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/04099971508859565039http://www.blogger.com/profile/15531516106199587979http://www.blogger.com/profile/04099971508859565039http://www.blogger.com/profile/15531516106199587979http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1278960802119#c8206402562815894675http://www.blogger.com/profile/04099971508859565039http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1277943965473#c968077054198852508http://www.blogger.com/profile/15531516106199587979http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1277826791336#c1314815365831566171http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1271068640825#c5465942984678909963
  • 7/31/2019 Dynamic File Generation

    18/24

    flat files for source and target . But in target I am unable to generate it. I did it till

    import file but after that I am unable to do .

    Can you please tell me the step by step process ?

    Looking forward to your reply.

    You can email me @ [email protected]

    Regards,

    Shashank

    July 23, 2010 1:10 PM

    syamprasadsaid...

    Hi sarma good-evening,

    I am new to this INFOMATICA ETL TOOL, please help me u , in which situation

    we uses this dyanamic-lookup, is it not possible with the help of static look-up?

    suppose if i run the mapping which contains defatult lookup for every 10 days

    with 10 days new data, is it not possible to maintain entire history in this way ,

    suppose if i used dyanamic lookup , then the mapping is continus running state ,

    for to contionus monitor of source , if is there any changes came in source,

    suppose if applied lookup on target table, what is use to update in lookup cacheafter it insert into the target table,

    MY MAIL-ID : [email protected]

    PLEASE SEND ME ANSWER TO MY MAIL, AND ALSO IF IS THERE ANY

    MATERIAL WHICH U PEREAPED OF THIS SEND ME ,

    AND ALSO I HAVE LOT OF DOUGHTS IN DATA-LODING IN DIMESTIONTABLE AND FACT TABLE , IF U HAVE ANY PPT OF RELATE TO THIS WHICH

    U PREPARED PLESE SEND ME ,

    Thank's & Reagard's

    N.V.Syamprasad,

    http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1279915817629#c6921683009157567771http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1279915817629#c6921683009157567771http://www.blogger.com/profile/18075607290345254523http://www.blogger.com/profile/18075607290345254523http://www.blogger.com/profile/18075607290345254523http://www.blogger.com/profile/18075607290345254523http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1279915817629#c6921683009157567771
  • 7/31/2019 Dynamic File Generation

    19/24

    August 23, 2010 5:38 AM

    Anonymous said...

    GE Sarma,

    I am new to ur blog. You r doing really good job.

    Here I have a scenario like while processing file to table I need to skip header and

    trailer which file had.

    Header is having no constant data.

    Trailer is mentioned like '000001254'.

    Any suggestions to implement this

    Thanx in advance........

    August 24, 2010 6:40 AM

    Ashish Sinhasaid...

    Hi Radha, Do we really need to use transaction control? Can we simply notconnect the identifier field in filename port name and make the file in append

    mode? let me know your thoughts..

    Thanks!

    Ashish

    October 3, 2010 11:36 AM

    Arjunsaid...

    Hi Radha Krishna,

    I am reading your blogs frequently. And your recent blog already solved my

    problem.

    Can you please help me how to populate the data in hierarchial type by using

    http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1282567104998#c5342459331721162429http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1282567104998#c5342459331721162429http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1282657208146#c5521203595608096586http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1282657208146#c5521203595608096586http://www.blogger.com/profile/02954199658016508387http://www.blogger.com/profile/02954199658016508387http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1286130986052#c6259383348015810944http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1286130986052#c6259383348015810944http://www.blogger.com/profile/17864341680816272092http://www.blogger.com/profile/17864341680816272092http://www.blogger.com/profile/17864341680816272092http://www.blogger.com/profile/02954199658016508387http://www.blogger.com/profile/17864341680816272092http://www.blogger.com/profile/02954199658016508387http://www.blogger.com/profile/17864341680816272092http://www.blogger.com/profile/02954199658016508387http://www.blogger.com/profile/17864341680816272092http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1286130986052#c6259383348015810944http://www.blogger.com/profile/02954199658016508387http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1282657208146#c5521203595608096586http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1282567104998#c5342459331721162429
  • 7/31/2019 Dynamic File Generation

    20/24

    oracle as source and .csv file as a target. Please do the needful.

    Arjun

    October 18, 2010 9:09 AM

    rizwansaid...

    hi radha,

    1)how to generate flatfile along with the field having its filename?

    2)how to generate dynamic output files using Transaction Control

    Transformation with single source,for example emp table,there should be a

    separate file for dept10,dept20,dept30?

    send ur reply to my mail id: [email protected]

    October 25, 2010 8:37 PM

    Anonymous said...

    Hi Radhakrishna,

    Thanks a lot for your inof.it helpem me a lot.

    Thanks!!

    December 10, 2010 2:47 AM

    Hardik Solankisaid...

    Hi Radhakrishna,

    Your blog on "How to generate target file names dynamically from the mapping?"helped me to generate target file names dynamically. However I have to create

    reject file names also dynamically. Is there any option using which I can create

    both target file names and reject file names dynamically for a particular

    mapping?

    My email id is: [email protected]

    http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1287418167927#c5610340853752744005http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1287418167927#c5610340853752744005http://www.blogger.com/profile/02632959007425919572http://www.blogger.com/profile/02632959007425919572http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1288064240902#c9049530188430037370http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1288064240902#c9049530188430037370http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1291978035057#c8776062981064441600http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1291978035057#c8776062981064441600http://www.blogger.com/profile/06685349688832404209http://www.blogger.com/profile/06685349688832404209http://www.blogger.com/profile/06685349688832404209http://www.blogger.com/profile/02632959007425919572http://www.blogger.com/profile/06685349688832404209http://www.blogger.com/profile/02632959007425919572http://www.blogger.com/profile/06685349688832404209http://www.blogger.com/profile/02632959007425919572http://www.blogger.com/profile/06685349688832404209http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1291978035057#c8776062981064441600http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1288064240902#c9049530188430037370http://www.blogger.com/profile/02632959007425919572http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1287418167927#c5610340853752744005
  • 7/31/2019 Dynamic File Generation

    21/24

    February 4, 2011 10:35 AM

    rajsaid...

    Thanks.

    April 12, 2011 10:27 AM

    rajsaid...

    Raja

    i am fresher mca candidate.Recently i done the course of informatica power

    center 8.6.0.but i am very dispoint i don't have any knowledge in project soplease send the project explanation documention.Mail id

    is:[email protected]

    April 12, 2011 10:32 AM

    Rachat de creditsaid...

    Thanks a lot it was a fantastic support, now to generate target file names

    dynamically from the mapping? is simple utilizing your advice. Kudos

    April 23, 2011 7:57 PM

    Anonymous said...

    m getting "WRT_8004 Writer initialization failed [Error opening session output

    file

    [/home/infrmtca/Informatica/PowerCenter8.6.0/server/infa_shared/TgtFiles/]

    [error=Is a directory]]. Writer terminating.

    WRT_8064 Error opening session output file

    [/home/infrmtca/Informatica/PowerCenter8.6.0/server/infa_shared/TgtFiles/]

    [errno=21] [error=Is a directory]"

    WHAT WOULD BE THE REASON FOR THIS AND I HAVE ALL PERMISSIONS

    ON TARGET FOLDER...

    http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1296844538484#c7460797217971690595http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1296844538484#c7460797217971690595http://www.blogger.com/profile/14949580192113320428http://www.blogger.com/profile/14949580192113320428http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1302629264419#c3670079605347662612http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1302629264419#c3670079605347662612http://www.blogger.com/profile/14949580192113320428http://www.blogger.com/profile/14949580192113320428http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1302629551388#c3780211440383460927http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1302629551388#c3780211440383460927http://www.7rachat-credits.com/http://www.7rachat-credits.com/http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1303613848574#c818507490552513855http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1303613848574#c818507490552513855http://www.7rachat-credits.com/http://www.blogger.com/profile/14949580192113320428http://www.blogger.com/profile/14949580192113320428http://www.7rachat-credits.com/http://www.blogger.com/profile/14949580192113320428http://www.blogger.com/profile/14949580192113320428http://www.7rachat-credits.com/http://www.blogger.com/profile/14949580192113320428http://www.blogger.com/profile/14949580192113320428http://www.7rachat-credits.com/http://www.blogger.com/profile/14949580192113320428http://www.blogger.com/profile/14949580192113320428http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1303613848574#c818507490552513855http://www.7rachat-credits.com/http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1302629551388#c3780211440383460927http://www.blogger.com/profile/14949580192113320428http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1302629264419#c3670079605347662612http://www.blogger.com/profile/14949580192113320428http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1296844538484#c7460797217971690595
  • 7/31/2019 Dynamic File Generation

    22/24

    May 30, 2011 9:36 AM

    Arvind said...

    Hi Radhakrishan,

    Thanks for your info.My requirement is to append a timestamp to the target .csv

    file and SFTP to a remote server.Could you please share some info on how we can

    achieve this?

    June 14, 2011 8:51 PM

    preythapsaid...

    Hi Radhakrishna sarma..

    thank you so much for the valuble info.

    am newbie in Informatica if you have any scenario based questions or examples

    please mail me.

    Thanks

    July 5, 2011 8:12 AM

    preythapsaid...

    forgot to mention mailid

    [email protected]

    July 5, 2011 8:14 AM

    chaitusaid...

    Hi radha krishna garu,

    add new file (F) icon is not seen in my system. can you please tell me how can i

    http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1306773362926#c1395940952268585179http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1306773362926#c1395940952268585179http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1308109912301#c4903448399158812470http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1308109912301#c4903448399158812470http://www.blogger.com/profile/15702509709798532919http://www.blogger.com/profile/15702509709798532919http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1309878739291#c1141987728221522560http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1309878739291#c1141987728221522560http://www.blogger.com/profile/15702509709798532919http://www.blogger.com/profile/15702509709798532919http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1309878899703#c3573672532157242785http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1309878899703#c3573672532157242785http://www.blogger.com/profile/15042117937650539303http://www.blogger.com/profile/15042117937650539303http://www.blogger.com/profile/15042117937650539303http://www.blogger.com/profile/15702509709798532919http://www.blogger.com/profile/15702509709798532919http://www.blogger.com/profile/15042117937650539303http://www.blogger.com/profile/15702509709798532919http://www.blogger.com/profile/15702509709798532919http://www.blogger.com/profile/15042117937650539303http://www.blogger.com/profile/15702509709798532919http://www.blogger.com/profile/15702509709798532919http://www.blogger.com/profile/15042117937650539303http://www.blogger.com/profile/15702509709798532919http://www.blogger.com/profile/15702509709798532919http://www.blogger.com/profile/15042117937650539303http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1309878899703#c3573672532157242785http://www.blogger.com/profile/15702509709798532919http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1309878739291#c1141987728221522560http://www.blogger.com/profile/15702509709798532919http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1308109912301#c4903448399158812470http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1306773362926#c1395940952268585179
  • 7/31/2019 Dynamic File Generation

    23/24

    retrieve that.

    chaitanya

    July 7, 2011 10:17 PM

    Arun said...

    Heyy Radha....

    I have used this option in the mapping and connected this port of the target

    definition with

    'a_'||Filename_dt_v||'_b.txt'. But the desired file is not being generated in my

    target directory.

    The dummy file fileoutput.txt is alone being generated in the output directory.

    August 15, 2011 12:06 AM

    venubabusaid...

    Hi RadhaKrishna,

    Can you please help me on the below design.I have a requirement of creating target files of each 25000 records in it with

    dynamic file names and also need to have the header and trailer for each target

    flat file with the dynamic file name.The source is RDBMS.

    Note : I am able to generate multipl files with dynamic names but only the logic i

    am missing to populate header and trailer for each file.

    Please find my email [email protected].

    Thank you,venu

    November 2, 2011 8:40 PM

    http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1310102267165#c741415748708353174http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1310102267165#c741415748708353174http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1313391991686#c7692228365984248860http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1313391991686#c7692228365984248860http://www.blogger.com/profile/03237841983298870762http://www.blogger.com/profile/03237841983298870762http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1320291636075#c4656234861001722034http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1320291636075#c4656234861001722034http://www.blogger.com/profile/15727088465321675035http://www.blogger.com/profile/03237841983298870762http://www.blogger.com/profile/15727088465321675035http://www.blogger.com/profile/03237841983298870762http://www.blogger.com/profile/15727088465321675035http://www.blogger.com/profile/03237841983298870762http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1320291636075#c4656234861001722034http://www.blogger.com/profile/03237841983298870762http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1313391991686#c7692228365984248860http://radhakrishnasarma.blogspot.com/2008/08/how-to-generate-target-file-names.html?showComment=1310102267165#c741415748708353174
  • 7/31/2019 Dynamic File Generation

    24/24

    Ranithsaid...

    Radhakrishna,

    Really your explanation is too good but here i have another query for you after

    creating the files dynamically i want to know how many records exist in that filehow can you achieve this ......

    Thanks in advance!

    http://www.blogger.com/profile/15727088465321675035http://www.blogger.com/profile/15727088465321675035http://www.blogger.com/profile/15727088465321675035