BOB: Business Objects Board
Not endorsed by or affiliated with SAP

Register | Login 

Follow BOB on Twitter! 
Follow BOB on Twitter! (Opens a new window)  

General Notice: No events within the next 45 days.

Date Generation Transform to add dates that increments daily


 
Search this topic... | Search DI: Designer and Job Design... | Search Box
Register or Login to Post    Forum Index -> Data Integrator -> DI: Designer and Job Design  Previous TopicPrint TopicNext Topic
Author Message
Hope
Principal Member
Principal Member



Joined: 29 Mar 2011

Posts: 104


flag
PostPosted: Thu Nov 08, 2018 11:41 am 
Post subject: Date Generation Transform to add dates that increments daily

I have a job that consumes incoming files, extracts some information from them and stores it in a database table. I wanted to add a date column to keep track of how many files came in and got consumed in a given day so added a date generation transform to the data flow. Idea was to insert a date to each record on the day it was extracted from the file. Say two files got consumed on 11-08-2018 and two records were extracted, I want to have 11-08-2018 inserted in the date column. Next day, 5 files got consumed, I want 11-09-2018 to be added in the date column.
The date generation transform I have added, however, isn’t adding the correct date to the records. Files coming in on a given day still have the start date. In date generation transform, I have the start and end date as the same.
What would be the setting to implement this correctly? Or is there a better way of achieving this?
Thanks.
Back to top
Jay_mKumar
Forum Member
Forum Member



Joined: 24 Mar 2016

Posts: 25


flag
PostPosted: Mon Nov 12, 2018 3:21 am 
Post subject: Re: Date Generation Transform to add dates that increments d

Hi,

please use a new column say Extract_Date and map it to sysdate().
it will assign the date on which your job is running.

Regards,
Jayant
Back to top
Hope
Principal Member
Principal Member



Joined: 29 Mar 2011

Posts: 104


flag
PostPosted: Mon Nov 12, 2018 8:57 am 
Post subject: Re: Date Generation Transform to add dates that increments d

I forgot to report that this is exactly what I did. Created a global variable and used sysdate() to pass current date in the 'date start' and 'date end' of date generation transform.
I think I dont have to use date generation transform. I can just create a new column and map it to sysdate() as you suggested?

Which one is more efficient, using date_generation transform or mapping a column to sysdate() directly
Back to top
Jay_mKumar
Forum Member
Forum Member



Joined: 24 Mar 2016

Posts: 25


flag
PostPosted: Mon Nov 19, 2018 1:57 am 
Post subject: Re: Date Generation Transform to add dates that increments d

Hi,

Its better to Use sysdate(), as you mentioned its a recurring load daily, so the date will be adjusted accordingly using sysdate() during the load.

Regards,
Jayant
Back to top
Display posts from previous:   
Register or Login to Post    Forum Index -> Data Integrator -> DI: Designer and Job Design  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT - 5 Hours
 
Jump to:  

Index | About | FAQ | RAG | Privacy | Search |  Register |  Login 

Get community updates via Twitter:

Not endorsed by or affiliated with SAP
Powered by phpBB © phpBB Group
Generated in 0.0305 seconds using 17 queries. (SQL 0.0035 Parse 0.0009 Other 0.0261)
CCBot/2.0 (https://commoncrawl.org/faq/)
Hosted by ForumTopics.com | Terms of Service
phpBB Customizations by the phpBBDoctor.com
Shameless plug for MomentsOfLight.com Moments of Light Logo