Saturday, July 12, 2014

WORKING WITH EVENT TASKS[Informatica Workflow Task]



WORKING WITH EVENT TASKS

We can define events in the workflow to specify the sequence of task execution.

Use the following tasks to help you use events in the workflow:

v    Event-Wait task. The Event-Wait task waits for an event to occur. Once the event triggers, the Integration Service continues executing the rest of the workflow.

Types of Events:

·        Pre-defined event: A pre-defined event is a file-watch event. This event waits for a specified file to arrive at a given location or directory.

Let us try to understand it with an example. You wanted to wait for a file to arrive in a directory while keeping the workflow on running mode. Once the file arrives in the directory the mapping session should automatically be kicked off to load the data into target.






·        User-defined event: A user-defined event is a sequence of tasks in the Workflow. We create events and then raise them as per need. In this case we first raise a user defined event and then configure the event wait which will wait for user defined event to occur and triggers the next session in the workflow

    EVENT RAISE: Event-Raise task represents a user-defined event. We use this task to raise a user defined event.
    EVENT WAIT: Event-Wait task waits for a file watcher event or user defined event to occur before executing the next session in the workflow.

Scenario:-
You have two sessions. The first session first remove the duplicates from the file (s_remove_dups) and once this gets completed then you need to run another session which calculates minimum and maximum salary (s_max_min_sal)

How to configure User-defined event
·         Workflow -> Create -> Give name wf_event_wait_event_raise -> Click ok.
·         Workflow -> Edit -> Events Tab and add events EVENT1 there.
·         Drag “s_remove_dups”
·         Click Tasks -> Create -> Select EVENT RAISE from list. Give name.
·         Right click event_raise_example -> EDIT -> Properties Tab -> Open Value for User Defined Event and Select EVENT1 from the list displayed. Apply -> OK.
·         Click link between event_raise_example and s_remove_dups and give the condition $s_remove_dups.Status=SUCCEEDED
·         Click Tasks -> Create -> Select EVENT WAIT from list. Give name event_wait_example. Click Create and then done.
·         Link event_wait_example to START task.
·         Right click event_wait_example -> EDIT-> EVENTS tab.
·         Select User Defined there. Select the Event1 by clicking Browse Events button.
·         Apply -> OK.
·         Drag s_max_min_sal and link it to event_wait_example.
·         Mapping -> Validate
·         Repository -> Save.
·         Run workflow and see.


Screenshot of Details


Saturday, March 22, 2014

Journey of Joy - A night spent at Kabani

It's really surprising and exceedingly well for me that first time I am in Bangalore and weekdays were more of trips and photowalks. Straight-away,credit goes to my loving family who has made it possible.My loving bro's mesmerized me with their ability to capture simple yet profound beauty of nature located in southern part of India, The Kabani.It is most popular wildlife destinations of Karnataka originates from the Wayanad District of Kerala state empties into the Bay of Bengal.Lush green landscape surrounding the large lake gives a spectacular view of wildlife and bird life where chirping of migratory bird specially in March,closer look of how the group of herbivorous wild animals interact among themselves to save their life from giant tiger and leopards and nonetheless feel of slow moving river is just like icing on the cake.During the summer many hidden Islands emerge out of backwaters & its a perfect place for Camping.No hard treks, No extreme adventure, Its just camping although we choose to stay like Maharaja in Maharaja Cottage.

We started our journey to “Kabani” on March 19th @ 7.15 AM from Bangalore, en-route we reached Mysore and met Miss Monalisha my sister at her college.We spent some quality family time with her and started @ 10:20 AM from Mysore towards our destination The Kabani. we reached Kabani @ 1:20 PM delay by an hour.But the moment we were near the entrance of wildlife resort the only expression which I could notice at the entrance from each one of us is WOW!!! such a nice place...The excitement and energy were in full upswing even if the weather was hot and dry.

We reached near the reception desk and looked for the proceeding of day.We explored the map of resort with the help of one of the person sitting at reception desk.From there straight-away towards our Maharaja Cottages. The cottage were influenced with more of Colonial style architecture.The breathtaking view of the backwaters of River, full of lusty green view from cottage gives us a heavenly feeling and we were sure that we are gonna spend some quality time away from fast,furious and crowded world.

We were asked to get ready for lunch.The dining facilities was amazingly good.It was of circular shape which is referred as the Ghol Ghar. About the food you can check with Mr Ranjan & Mr. Tej my bro's.They were eating as if they didn't had since a month or so.We get back to Maharaja Cottage somewhere around 3:00 PM.We among ourselves were discussing about the ambience & facilities meanwhile somebody knocked the door and asked us to get ready for motorboat safari.We get into the motorboat. It was an amazing ride. Watched the forest from river and spotted few animals.Among the animals, deer, elephants, gaur and crocodiles were most common. Watched different types of birds.Later that evening we enjoyed the company of a large "Stripe-necked Mongoose" before ending the motorboat safari... The weather was hot still we were enjoying moments. At one place which is territory of one big tiger and 3 cubs, we waited for about 10 min in pin drop silence on boat. Our bad luck tiger didn't turn up near to water.Ended Boat Safari after 3 hours. It was very long and enjoyed every moment.

Got back to the cottage somewhere around 7:00 PM.Had a cup of coffee in the balcony of cottage.Mesmerizing view of river,jungle and chirping of different birds gives us feeling as if we are in heaven for sometime.This was serene, quiet and so pleasant. We chatted along for a while, talking about how we should spend more time outdoors, go camping somewhere maybe.Meanwhile Mr. Ranjan commented don't you guys think we should be ready for dinner.Obsession about the food shown by Mr Ranjan & Tej took us again back to Gol Ghar.The food comprises of piping hot buffet of multi-cuisine, well-planned menu which includes Indian, Chinese and Continental dishes.

After finishing the dinner, we assembled into a movie hall for about 45 mints for wildlife documentaries screened at the lodge.8:30 PM. After that we had an option to bask in the warmth of the campfire, while we opted to get back to Cottage and chat for some more time.Overall the day was good.There is plenty for us to see, hear and photograph. Varieties of birds fly about in colorful array chirping and singing through the day.The night spent at the cottage was good too.We can feel slow moving wind, peaceful, and a natural landscape right on the bank of river.

On the 20th March, early in the morning we head towards the vibrant wild forest in search of lively panther that dashed across the road, several wild dogs, elephants, gaurs, sambars, spotted deers,wild pigs and nonetheless a large variety of birds.This was indeed through Jeep Safari deep into the Jungle. we were more thrilled to enter into woods with great expectations.Suddenly Jeep halted deep into the Jungle for more than 10 mins and we were so fortunate to see fresh tiger mark on the mud.It was not even more than 15 mints suddenly few deer started barking & hooting sounds from monkey.We were little conscious.I suddenly turned towards trip guide and asked why this sound..!He informed us that its an alarm bell from monkeys & deer that tiger or leopard is around making watchful to entire herbivorous family. There was plenty of butterflies all moving around in patches. Just after a few metres we were greeted by a group of spotted deer.The group consisted of bucks,does and some very cute calves.Next we saw some more deer, magnificent nilgiri langoors and giant malabar squirrels and nonetheless peahen & peacocks.

Around 9:30 AM we came back to cottage had breakfast and coming towards an end of approx 225 KMs journey.My mind is refreshed enough for a fresh start.

Welcome to the beautiful world of nature !!!

Friday, July 26, 2013

OBIA - Currencies and their Exchange Rates.



A business does the transaction in multiple currencies. Therefore, to create a meaningful report you have to use the common currency across the transactions.

The warehouse of oracle BI uses the below types of currencies:-
01.Document Currency: - This is the currency of transaction. For Example: - If you purchase a laptop from the supplier in France, the document currency would be EUR.
02.Local currency: - The local currency is the base currency of your ledger, or the currency in which your accounting entries are recorded.
03.Global currencies: - Oracle BI provides three global currencies which is useful while creating enterprise wide report. For every transactional amount fetched from source, ETL part of Oracle BI loads the document and local amounts into the warehouse table. Along with the amount it also stores the exchange rates required to convert the document amount into each of the three global currencies. For fact tables, there are two amount columns one for the Local currency amount and other for the Document currency amount. In addition, there are three columns covering the Global currency (for example, global _amount1) and their corresponding exchange rate columns. These global _amounts are stored in aggregate tables of the corresponding facts. For Example :-
W_AP_XACT_GRPACCT_FSCLQTR_A.AP_GLOBAL1_AMT = W_AP_XACT_F.AP_DOC_AMT* W_AP_XACT_F.GLOBAL1_EXCHANGE_RATE   
  To configure the global currencies you want to report:

1.   In DAC, go to the Design view, and select the appropriate custom container from the drop-down list.
2.   Display the Source System Parameters tab.
3.   Locate the following parameters, and set the currency code values for them in the Value field:
o    $$GLOBAL1_CURR_CODE (for the first global currency).
o    $$GLOBAL2_CURR_CODE (for the second global currency).
o    $$GLOBAL3_CURR_CODE (for the third global currency).
You can specify any currency, provided an exchange rate is specified for the conversion to the local currency. Ensure that you spell the currencies as they are spelled in your source OLTP system.
4.   Save your changes.



OBIA-Exchange Rates

As discussed above, to get the correct value of GLOBAL1_AMT, we require the value of GLOBAL1_EXCHANGE_RATE.Therefore, exchange rate types is the important parameter to understand to get the amount in global currencies.

To configure exchange rate types:

1.   In DAC, go to the Design view, and select the appropriate custom container from the drop-down list.
2.   Display the Source System Parameters tab.
3.   Locate the following DAC parameters and set the exchange rate type values for them in the Value field:
o    $$GLOBAL1_RATE_TYPE
o    $$GLOBAL2_RATE_TYPE
o    $$GLOBAL3_RATE_TYPE
o    $$DEFAULT_LOC_RATE_TYPE (the conversion rate type for document currency to local currency conversion).
Make sure you spell the exchange rate type values as they are spelled in your source OLTP system.
4.   Save your changes
 

Exchange Rates Calculations (OBIA-ETL)

Exchange rate calculation is done by the mapplet MPLT_CURCY_CONVERSION_RATES_ToGlobalCurrenciesOnly in SILOS. This mapplet is responsible for getting the correct exchange rates for a date chosen, where a currency conversion to any of the three possible global currencies is involved. 

We first get the value of GLOBAL1_CURR_CODE by doing a lookup on W_GLOBAL_CURR_G table, condition match on Datasource Number and Tenant Id.


The W_GLOBAL_CURR_G table is always populated with one record and that record has the value of $$GLOBAL1_RATE_TYPE,$$GLOBAL2_RATE_TYPE,$$GLOBAL3_RATE_TYPE,$$DEFAULT_LOC_RATE_TYPE AND $$GLOBAL1_CURR_CODE,$$GLOBAL2_CURR_CODE,$$GLOBAL3_CURR_CODE populated from DAC. The mapping SIL_GlobalCurrencyGeneral_Update just read the above mentioned DAC parameters and loads same record into W_GLOBAL_CURR_G.
Once the GLOBAL1_CURR_CODE is retrieved as part of the lookup on table W_GLOBAL_CURR_G

We check below four conditions:-


01. Is GLOBAL1_CURR_CODE NULL. If so populate GLOBAL1_EXCH_RATE as NULL
02. If first condition is not satisfied we check Is GLOBAL1_CURR_CODE = DOC_CURR_CODE.Then populate GLOBAL1_EXCH_RATE as 1.0
03. If first and second condition is also not satisfied then is DOC_CURR_CODE = 'STAT'.If so then populate GLOBAL1_EXCH_RATE as 1.0
04. If first,second and third condition is also not satisfied then is GLOBAL1_CURR_CODE = LOC_CURR_CODE.If so then below :-
                   A. Is LOC_EXCHANGE_RATE is NULL if so then GLOBAL1_EXCH_RATE as NULL
                   B. If first condition is not satisfied we check Is LOC_CURR_CODE = DOC_CURR_CODE then populate GLOBAL1_EXCH_RATE as 1.0
                   C. Default do a lookup on W_EXCH_RATE_G on the condition (DOC_CURR_CODE,LOC_CURR_CODE,EXCH_DT,LOC_RATE_TYPE_VAR,DATASOURCE_NUM_ID) and populate GLOBAL1_EXCH_RATE [LOC_RATE_TYPE_VAR = IIF(ISNULL(LOC_RATE_TYPE), DEFAULT_LOC_RATE_TYPE (DAC Value), LOC_RATE_TYPE)]

Default case :- Do a lookup on W_EXCH_RATE_G on the condition (DOC_CURR_CODE, GLOBAL1_CURR_CODE, EXCH_DT,GLOBAL1_RATE_TYPE, DATASOURCE_NUM_ID) and get the value of EXCH_RATE and populate it as GLOBAL1_EXCH_RATE.



Now how W_EXCH_RATE_G is getting populated:-
The W_EXCH_RATE_G is populated by SIL_ExchangeRateGeneral(This mapping is responsible for loading dimension records for the table W_EXCH_RATE_G based on the corresponding staging area table. This mapping takes care of inserting new records as well as updating existing records in the target table. On a requirement basis, this mapping also 'soft-deletes' records from the target table (meaning, marking a record as 'Deleted' instead of physically deleting them).)

SIL_ExchangeRateGeneral reads the data from W_EXCH_RATE_GS table.


W_EXCH_RATE_GS basically picks the data from GL_DAILY_RATES OLTP table.

General Ledger provides the following predefined daily conversion rate types:
 Spot: An exchange rate which you enter to perform conversion based on the rate on a specific date. It applies to the immediate delivery of a currency.

Corporate: An exchange rate you define to standardize rates for your company. This rate is generally a standard market rate determined by senior financial management for use throughout the organization.
User: An exchange rate you specify when you enter a foreign currency journal entry.
EMU Fixed: An exchange rate General Ledger provides automatically when you enter journals (after the EMU effective starting date) using a foreign currency that has a fixed relationship with the Euro.
OBIA 7.9.6.x does not support Spot and User rate types.