top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How is the best way to generate a calendar table in PowerCenter?

+2 votes
236 views

I must generate a table of calendar dates from dateIni to dateEnd in Powercenter Designer.

dateIni is is fixed, for example '2013-01-01' dateEnd is sysdate + 'n' months

I'm trying to generate from a java tranformation, that can generate several dynamic rows but needs an input row and I do not have any input... it there any other better approach using seq generator???

As an example table content result must be

date
=======
'2013-01-01'
'2013-01-02'
'2013-01-03'
...
...
'2016-03-10'
posted Oct 13, 2014 by Amit Sharma

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

You can pass a single input row from any source into the Java transformation and then generate rows with consecutive dates in a loop.

You can create a simple table with two columns - dateIni and dateEnd. It will contain a single row that will both kickstart the Java code and provide configuration for the mapping.

answer Oct 15, 2014 by Shweta Singh
Similar Questions
0 votes

This may be a naive question, but I am stuck on this simple one. I have to import a specific source table from the source database. I could see only a few schemas and not all (as there are thousands of), hence could not select desired table, so I am specifying the table in search box. But it does not show up anything. I tried using schema.tablename and different combinations but in vain. Infact, when I try searching for the tables that are already visible, they doesn't show up. Where am I going wrong in searching for a specific table? ANy help is appreciated!

+3 votes

I have to import a specific source table from the source database. I could see only a few schemas and not all (as there are thousands of), hence could not select desired table, so I am specifying the table in search box. But it does not show up anything. I tried using schema.tablename and different combinations but in vain. Infact, when I try searching for the tables that are already visible, they doesn't show up. Where am I going wrong in searching for a specific table? ANy help is appreciated!

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.

+1 vote

I have a complex XML document that the informatica XML parser struggles with "normalizing", how can I run a XML transformation such as XSLT to simplfy it prior to sending it into the XML parser.

...