Vishal Lambe's Blog, page 5

August 5, 2014

[Informatica] Default Variable Initialization

Following are the default values of variable ports in Informatica. Unless overridden, they remain the same.

Integer Variable port - 0
String Variable port - NULL
Date Variable port - 01/01/1753 where date handling is disabled
Date Variable port - 01/01/0001 where date handling is enabled

Owing to this default values of variable port, Integer variable port for example, can be used as a country variable by incrementing the value for each new row.
VAR=VAR+1

 •  0 comments  •  flag
Share on Twitter
Published on August 05, 2014 20:24

[Informatica] ERROR('transformation error') ? Here's what you need to do

The default value of all the output ports in Informatica is set to ERROR ('transformation error'). Whenever an error occurs in the transformation, the Integration service skips the row and logs the ERROR in session log.

Therefore, whenever such an error occurs, you must look for one of the below in your Mapping:
1. Datatype conversation errorrs.
2. Divide by 0 errors or  other Expression valuation errors.
3. Call to ERROR function.

 •  0 comments  •  flag
Share on Twitter
Published on August 05, 2014 20:24

August 4, 2014

[Did You Know] Informatica - Expression

Did you know that the maximum number of characters that can be entered in an Informatica Expression port is 32,767.

This includes port names, formulae and calls to other transformations such as lookups.

 •  0 comments  •  flag
Share on Twitter
Published on August 04, 2014 11:29

Unix terminal hanged ? Here's what you need to do

Sometimes, while in a hurry we press some inadvertent combination of keys and the Unix terminal hangs. And then we wonder what went wrong, why won't the terminal respond.

What happens actually is, accidentally, we press CTRL + s. This actually tells the terminal to stop transmitting, so that no key stroke is taken in via the input stream.

CTRL + s = stop transmission
CTRL + q = resume transmission

This come handy in instances where the output to be displayed on screen is very large. In such a case, you can press CTRL + s and pause the screen.

 •  0 comments  •  flag
Share on Twitter
Published on August 04, 2014 09:09

July 23, 2014

[Informatica] Unix One-liner To find If A File Is Empty

Unix One-liner To find If A File Is Empty
Sometimes, we face scenarios where we wish to take a action only if a file is empty. For example, we may like to populate some data in a file only when the file is empty.

Also, writing a script is always not feasible.

Being from an Informatica and Data warehousing platform, I often face this scenario. We can use the below one-liner command to find if a file is empty and populate data in it. The reason we want it to be a one-liner is that in Informatica pre/post session command we CANNOT use commands with multiple lines. So here is the one-liner:

[[ $(tr -d "\r\n" < filename.txt|wc -c) -eq 0 ]] && echo "dummy content in file" >> filename.txt

Explanation:
1. wc -c checks if the character count in file is zero (meaning file exists and it is empty)
2. && is UNIX equivalent for AND operation
3. The echo command then redirects ( >> ) the "dummy content in file" text to filename.txt
 •  0 comments  •  flag
Share on Twitter
Published on July 23, 2014 06:24

July 19, 2014

A sad cat's dairy

Dear dairy, the authorities have removed the cuddly sack from the couch. They claim it is filthy. I no longer have a place to sleep. I have vomited three times in protest, but there is no sign that my demand to reinstate the sack on the couch will be accepted. I continue to lie beside the door, on the cold floor. My only other hope of rest is besides the fish tank, which these days is vacant, I will wait.

Dear dairy, this is the fifth day in continuation that my food dish is only half full,or half empty. The new dog seems to take all the attention from the authorities. I continue to die with starvation. I have several times tried to draw the authorities attention to my unfateful predicament, however I assume that the authorities are either dumb or insensitive to me. This may be my last entry.

Dear dairy, I continue to fail to understand the authorities love for Rocky the dog. I mean what kind of an animal sniffs his own butt and licks the authorities cheeks right after. Rosy refused to join the poop party today.

Dear dairy, it had come to my attention that the authorities have two hands, but seem to have made a sadistic policy to pet me with only one of them at a time. Half the love is just... low! My spirit is breaking. Also, I am still confused as to why Rocky circles three times before pooping.

Dear dairy, I have decided to plead with the authorities to rub my belly, I suppose it will do me good in my current situation. I would like to receive two rubs exactly... A third one and I shall bite the shit out of them as per cat protocol. Wish me luck!

Dear dairy, the water dish continues to vex me. The authorities' cruel attempt to fill the dish with colorless, tasteless liquid is inhuman. This is the 900th day that my nose has been unintentionally wetted.

Dear dairy, the authorities have punished me for pooping in the kitchen floor. This despite my efforts to distribute evenly the litter throughout the house. I am convinced that they are madmen, devoid of reason.

Dear dairy, the squirrel was back again today, it mocks me. I shall try and relieve my mind from it. I shall meditate. I have been stalking an insect on the wall for last 3 days. All my attempts to catch it have been futile. However, today on further inspection, I found that it was merely a thumb print left by one of the authorities. There is no logic in this place.

Dear dairy, it is 3 in the morning and the authorities have closed the bedroom door. I can only assume that they have left me to die, alone. As a mark of protest, I have decided to stand here, still, till someone opens the door. I shall sing.

Dear dairy, somehow as through some sort of magic, the plant I have been trying to destroy has reappeared. I shall have to start again... This is almost as if I am bound to hell.

 •  0 comments  •  flag
Share on Twitter
Published on July 19, 2014 09:49

July 9, 2014

Argument for God's existence: Degree

Lately I have been reading 'The God Delusion', and I must admit that author Richard Dawkins presents some interesting arguments for 'why there is certainly no God'. A must read for all believers and agnostics, may be you will end up becoming an atheist by the time you finish this book.

As far as I am concerned, I have been an agnostic so far. I am on chapter 3, let's see how things turn up 😊.

Coming back to the argument of degree for God's existence, Dawkins says that we notice that things in the world differ. And as I have earlier pointed out in my own blog posts, almost everything is superlative. We compare everything to something standard, a defined threshold. But however, it is not humanly possible to set the highest threshold, because humans surpass themselves with every second that is gone.

Therefore there must be some other maximum to set the standards for perfection, and we call that perfect standard as God.

This reminds me of my favourite song by Oasis, 'little by little'.

'true perfection has to be imperfect,
I know that that sounds stupid but its true!'

 •  0 comments  •  flag
Share on Twitter
Published on July 09, 2014 11:46

July 5, 2014

Bicycle : A short story

Riyaz would switch between ringing the bicycle bell, shouting 'hato, hato' and losing himself in a thoughtless void.

Every Friday Abbu would take Riyaz to masjid on his bicycle. Riyaz once told Raju that the masjid is so big that all the worlds toys couldn't fill it up. Raju and Riyaz would then share their lunch boxes.

Abbu's namaz would never be completed without buying ice cream for Riyaz way back home. 'olange, olange... Riyaz would shout. Abbu would patiently wait till Riyaz would finish licking his ice cream. Then both would ride their way back to home. Riyaz would firmly grasp the bicycle handle with his right hand, while his left hand would be busy guarding his topi against the wind. For some reason Abbu would always keep his topi in his payjama pockets while crossing the market yard.

It had become a ritual for Riyaz to smile every time Abbu would say 'aadab' or 'namaste'. Today Abbu stopped at Azeem chaccha's pan shop. Riyaz was busy wondering what he would play with his siblings when back home. When Abbu came back, Riyaz asked him if he could see the whole world. Abbu smiled and replied back saying that he could see the whole world when he would be young. Riyaz wouldn't budge. Abbu couldn't see Riyaz sad, he said ' aaj hi chalenge beta, aaj hi chalenge'. Innocent Riyaz was happy again.

Abbu rode his bicycle to the cemetery outside the village. Both then visited Ammi's grave. Abbu asked Riyaz to offer the flowers they had bought. Riyaz and Abbu then sat under the tree nearby. Riyaz got asleep on Abbu's lap. Abbu caressed Riyaz's forehead while tears rolled down his cheeks. Abbu slowly picked up Riyaz in his arms, taking care not to wake him up. He then cushioned front basket specially made for Riyaz with his 'gamcha'. He then took the handle by his hand and carried the bicycle all the way to the home.

 •  0 comments  •  flag
Share on Twitter
Published on July 05, 2014 07:46

Bicycle

Riyaz would switch between ringing the bicycle bell, shouting 'hato, hato' and losing himself in a thoughtless void.

Every Friday Abbu would take Riyaz to masjid on his bicycle. Riyaz once told Raju that the masjid is so big that all the worlds toys couldn't fill it up. Raju and Riyaz would then share their lunch boxes.

Abbu's namaz would never be completed without buying ice cream for Riyaz way back home. 'olange, olange... Riyaz would shout. Abbu would patiently wait till Riyaz would finish licking his ice cream. Then both would ride their way back to home. Riyaz would firmly grasp the bicycle handle with his right hand, while his left hand would be busy guarding his topi against the wind. For some reason Abbu would always keep his topi in his payjama pockets while crossing the market yard.

It had become a ritual for Riyaz to smile every time Abbu would say 'aadab' or 'namaste'. Today Abbu stopped at Azeem chaccha's pan shop. Riyaz was busy wondering what he would play with his siblings when back home. When Abbu came back, Riyaz asked him if he could see the whole world. Abbu smiled and replied back saying that he could see the whole world when he would be young. Riyaz wouldn't budge. Abbu couldn't see Riyaz sad, he said ' aaj hi chalenge beta, aaj hi chalenge'. Innocent Riyaz was happy again.

Abbu rode his bicycle to the cemetery outside the village. Both then visited Ammi's grave. Abbu asked Riyaz to offer the flowers they had bought. Riyaz and Abbu then sat under the tree nearby. Riyaz got asleep on Abbu's lap. Abbu caressed Riyaz's forehead while tears rolled down his cheeks. Abbu slowly picked up Riyaz in his arms, taking care not to wake him up. He then cushioned front basket specially made for Riyaz with his 'gamcha'. He then took the handle by his hand and carried the bicycle all the way to the home.

 •  0 comments  •  flag
Share on Twitter
Published on July 05, 2014 07:46

July 4, 2014

जयोऽस्तु ते जयोऽस्तु ते! जयोऽस्तु ते!

One of the most moving, inspiring and patriotic works in Marathi literature by Veer Sawarkar.

जयोऽस्तु ते जयोऽस्तु ते! जयोऽस्तु ते!
श्री महन्मंगले शिवास्पदे शुभदे स्वतंत्रते भगवती त्वामहम् यशोयुतां वंदे!

राष्ट्राचें चैतन्य मूर्त तूं नीती संपदांची
स्वतन्त्रते भगवती श्रीमती राज्ञी तूं त्यांची
परवशतेच्या नभांत तूंचि आकाशीं होशी
स्वतन्त्रते भगवती चांदणी चमचम-लखलखशी

गालावरच्या कुसुमीं किंवा कुसुमांच्या गालीं
स्वतन्त्रते भगवती तूंच जी विलसतसे लाली
तुं सूर्याचें तेज उदधिचें गांभीर्यहिं तूंचि
स्वतन्त्रते भगवती अन्यथा ग्रहणनष्टतेची

मोक्ष-मुक्ति हीं तुझींच रूपें तुलाच वेदांतीं
स्वतन्त्रते भगवती योगिजन परब्रह्म वदती
जें जें उत्तम उदात्त उन्नत महन्मधुर तें तें
स्वतन्त्रते भगवती सर्व तव सहकारी होती

हे अधमरक्तरञ्जिते सुजनपूजिते
श्री स्वतन्त्रते
तुजसाठि मरण तें जनन तुजवीण जनन तें मरण
तुज सकल-चराचर-शरण चराचर-शरण

-विनायक दामोदर सावरकर

 •  0 comments  •  flag
Share on Twitter
Published on July 04, 2014 10:28