Ex: feedscoming frm UK and my processing area isin Hokng,etc

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
sekharg_dw
Participant
Posts: 19
Joined: Mon Jul 18, 2005 5:37 am

Ex: feedscoming frm UK and my processing area isin Hokng,etc

Post by sekharg_dw »

Hi all,

example :-
Im getting feeds from Uk,india..etc and my porcessing areas are in USA,FRANCE,SINGAPORE etc. and these data is comming from Oracle database .
I need to change the data according to the processing location time and date i.e USA,Singapore,France Etc.

how to do that ( this is can be done through writting Java function) i wnt to know wether any alternative is avalible in Oracle / Datastage.

tnks in Adv
djm
Participant
Posts: 68
Joined: Wed Mar 02, 2005 3:42 am
Location: N.Z.

Post by djm »

I'm interpreting your request as "how can you extract data from a system in one time zone and display the data meaningfully for another time zone" e.g. if the data has a timestamp of 15:00 in one time zone, for a time zone that is two hours in front of it, you want to diplay the time as 17:00. If this interpretation of your question is incorrect, the following answer may not be useful to you.

Faced with the scenario that you have, one approach is to extract all timestamps from a common based. One choice for doing this is for timestamps to be expressed as UTC (Universal Time Coordinates?), which also happens to be identical to GMT. So for example, I am writing this message at roughly 20:45 NZDT but it would be sensible to record that with a date/timestamp of 2005-12-12 07:45:00 UTC. When displaying the data to a user, it is then possible to turn it into a timestamp relative to their location. Using a common base also helps avoid issues of the same hour occurring multiple times in the same day (e.g. for locations that utilize daylight saving).

If you want to understand the technique further, I would recommend you read one (or more!) of Ralph Kimball's books.

HTH.

David
sekharg_dw
Participant
Posts: 19
Joined: Mon Jul 18, 2005 5:37 am

Post by sekharg_dw »

hope this will gv u a clear picture !


incomming feed :-< date-time>
12/12/2005/14:10:55 this is feed coming from India..
i need to process this feed in France and USA..
inorder to process frist i need to convert india time zone to USA and France .
rkdatastage
Participant
Posts: 107
Joined: Wed Sep 29, 2004 10:15 am

Post by rkdatastage »

Hi

In my view you have to answer my question that is the feeds which are coming from source are through flat files with any naming convention or you are connecting to a database server of each of source locations with different connection strings...?

RK
sekharg_dw
Participant
Posts: 19
Joined: Mon Jul 18, 2005 5:37 am

Post by sekharg_dw »

the source is comming from Oracle ! suppose in feed 1 date and time field comes with the location from which it is comming

to gv more clearity !
SOURCE:-
FEED1---> DATEAND TIME IS INDIA TIME--> PROCESSING AREA USA
FEED2---> DATE AND TIME IS SINGAPORE --> UK
....
....
..
FEED100---> DATEAND TIME IS INDIA TIME-->PROCESSING ARE HONGKONG




rkdatastage wrote:Hi

In my view you have to answer my question that is the feeds which are coming from source are through flat files with any naming convention or you are connecting to a database server of each of source locations with different connection strings...?

RK
sekhar g
mumbai
ameyvaidya
Charter Member
Charter Member
Posts: 166
Joined: Wed Mar 16, 2005 6:52 am
Location: Mumbai, India

Post by ameyvaidya »

If I've understood the issue correctly:
Your data sources contain date/time fields in a time zone that is different from the time zone this data is to be processed in.

1. A little elaboration on what processing needs to be carried out would help. If all that is required is simple date/time differences, the time zone may even be irrelevant in the needed logic.

2. If the current (Source) date, time is necessary for processing these rows, a new column can be added and the derivation set to "sysdate" in the source SQl query. This should get the current timestamp from the source Database server's time zone.

OR
Create a sequence that first calls the below job:
Add a small server job that executes

Select sysdate from dual

Assign this date to userstatus.

In the calling sequence, this userstatus field can be passed to any job as a job parameter
Amey Vaidya<i>
I am rarely happier than when spending an entire day programming my computer to perform automatically a task that it would otherwise take me a good ten seconds to do by hand.</i>
<i>- Douglas Adams</i>
Post Reply