top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to change file names in multiple folders in Informatica?

+2 votes
387 views

I have this informatica requirement where, i am getting some files say 1000 files, these files gets divided into multiple folders on unix server. i want to rename this file, let me give you an eg:

File name:input
abc1.txt
abc2.txt
abc3.txt

Now I want to change these file names by adding account_no,client_no,datestamp(all these values resides in one table). eg:
abc1_123_123_date.txt
abc2_456_321_date.txt
abc3_789_765_date.txt

This is just an eg: ..like this I ll be having say 10 listfiles and each listfile ll contain 100 files.Do i need to create 10 mappings for each listfile or is there any way that i can implement this in single mapping.

Please note:I cannot club all files in one folder and then change the file names and then again divide into original directories, as sometimes we get files in separated directories and we have to change there name and keep them in that particular folder only(for other business logic).

Kindly provide solution for this.

posted Mar 9, 2017 by Vipin Kumar

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+2 votes

Currently, we have a lot of ETLs developed and the underlying table and column names are going to change. For example, the physical names used abbreviated names rather than full names since we wanted to deploy on Oracle, but for now, we decided we will use only SQL Server, hence there is a discussion on using full names at the DB level. This will impact the ETLs that we have already developed.

I was just wondering whether there is any efficient way to remap the ETL to the changed column names? I can provide a file with old and new table/column names as input.

Any help on this will be really appreciated.

+6 votes

I have this query say

Select A, B from Language.Alphabet

Where Language is my Schema Name, this query is used in Informatica Source Qualifier. This query is in Dev at this point so as I go to QA and Prod, the schema name needs to be changed, so rather than going to the query all the time I would like to change the schema name from our scheduling tool DAC.

I tried to parametrize this in Informatica by creating a parameter file and placing it on Informatica server, I get the desired results from this but only if I execute the workflow from Workflow Monitor and not from DAC, but I want it to be done from DAC.

+2 votes

So we have a share folder that we import all of our database tables into and then each of the developers have their own development folder and they just create shortcuts to the source tables and target tables they need. I have been trying to find a way to change the default shortcut name (i.e. Shortcut_to_nameoftable). I am talking about about the Informatica Powercenter Designer.

Any help would be appreciated, Thanks

0 votes

I have some files that I would like to consolidate into a single database table. The files have similar but different formats. The files look something like this:

FileOne:
•ColA : string
•ColB : string
•ColC : string

FileTwo:
•ColAA : string
•ColBB : string
•ColCC : string

FileThree:
•Col01 : string
•Col02 : string
•Col03 : string

The destination table looks like this:

TableDestination:
•ColFirst : string
•ColSecond : string
•ColThird : string

I want to develop a mapping that ETLs these three files into this one database, but because the column names are different, it looks like I'll have to develop three different mappings, or three different sources, or three different somethings. The problem is that my example is contrived: I actually have many different files that all have different formats and column names, but the data is all very similar.

I would like to develop a single mapping or workflow that can handle all of this by only adding a table that holds the column mappings. Such a table would look like this based on the sample files and sample table above:

TableMappings:
enter image description here

In this way, to edit a column mapping I only have to make an edit this this TableMappings table. I wouldn't have to make any changes at all to the mapping or workflow. Nor would I have to redeploy an application.

What would a mapping or workflow look like that could take advantage of something like this? I assume there'd be a flat file source that takes files from a folder. There would be something in the middle that uses this TableMappings table to map column names. Finally there would be a relational data object that represents my destination database table "TableDestination". I don't know how to put this together though.

...