Monday, 24 November 2014

Useful Linux Commands !!

Here, we have some important commands which going to help us to work with Linux OS.

Sl. No. Activity Syntax
1 To change permission of folder  chmod  –R  777  <folder_path>
2 To change folder owner of folder chown  –R  <user_name>:<group_name> <folder_path>
3 To get the details about a user ID  <user_name>
4 To restart the VNS server service  vncserver  restart 
5 To disable firewall  service  iptable  stop
6 To unzip tar file tar  –xvf   <tar_file_name>
7 To unzip the jar file  jar xvf  <jar_file_name>
8 To copy a file from one server to another server scp  –r  <file_name/folder_name>   <Target_Machine IP>:<Target_location>
9 To remove a file  rm  -rf  <folder_name>
10 To edit a file vi  <file_name with location> 
11 To save  a file :wq!
12 To check a running process ps  -ef|grep  i   “Informatica”
13 To give access control to any host xhost  +
14 To check the RAM/CPU Utilization ps -aux 
15 To check the memory top
16 To check the free memory free  -m
17 To clear the cache form server   echo 1 > /proc/sys/vm/drop_caches
18 To Reboot the server shutdown –r now
19 To see every process running in a system ps -A
Ps -e
20 To See every process except those running as root ps -U root -u root -N
21 To See process run by user Sudi ps -u sudi
22 To find a specific port status netstat -p -nlp|grep 7001



I will updating this post going onwards...

Enjoy & Stay Well!! 

Tuesday, 18 November 2014

Informatica: Update Target Table Without Update Strategy


Its very much possible to update the target table without using the update strategy transformation. In Informatica session we have option to enable this.

Open Informatica session , navigate to properties and set Treat source rows as ‘Update’ .
 

 
Then open Informatica session, navigate to Mapping and set target as "Update as update" Only.
 
 
 
 
But remember, It will always update the all the columns of target table with the data will come from source. Single column is not possible to update using this option.
 
Please put your comments !!
 

 

Informatica: Update Target Table with Non-Key Columns

Update Target Table with Non-Key  Columns.
 
Update Strategy transformation will update/insert/reject operation based on the Key defined in target table. Integration service will check for key column to do the update operation if we are using Update Strategy transformation in our mapping. But in our real-time project it can be required to update the target table based on Non-Key column also.
Lets take an example, here TEST_DS is our source table having the below data:
EMP_NUM
EMP_NAME
100
Sudi
200
Jayak
 
And TEST_D table is our target table  having the below data.
 
ROW_WID
EMP_NUM
EMP_NAME
PHONE_NUMBER
1
100
Sudipta C
9901
2
100
Sudipta C
9900
3
200
JK
8000
4
200
JK
8001
 
Now our requirement is to update the TEST_D table as per the TEST_DS data we have. If you notice in TEST_D table EMP_NUM is not a key column. But we need to use only EMP_NUM column for updating the TEST_D table. So our expected result should be like,
ROW_WID
  -EMP_NUM
 EMP_NAME
---PHONE_NUMBER
1
100
Sudi
9901
2
100
Sudi
9900
3
200
Jayak
8000
4
200
Jayak
8001
 
 
This can be handled using the “Update Override” property in target table.
 
 
Lets create a simple mapping to update the TEST_D table using Update Strategy transformation.


 
 
Now, open the target table and put your own update statement to update the target table.



 
 
Syntax to write SQL statement :
 

 
Create the Session and Workflow and run the mapping.
 

Power BI: Show Last Data Refresh on Dashboard

 To show last data refresh on Power BI report follow the below steps. 1. Open Report Query Editor Mode. 2. Clink on Get Data -> Blank...