Thursday, December 12, 2024

Transformations in IICS

IICS consists of a few transformations that are similar to the Informatica Power Center.
Some of the transformations are Expression, Filter, Joiner, Lookup, Router, Aggregator, Sorter, Stored Procedure (SQL), Rank, Union, Sequence, Normalizer, and Transaction Control.

Below is the list of transformation properties screenshots we use in mappings.

EXPRESSION TRANSFORMATION:








FILTER TRANSFORMATION:









JOINER TRANSFORMATION:






CONNECTED LOOKUP TRANSFORMATION:









UNCONNECTED LOOKUP TRANSFORMATION








ROUTER TRANSFORMATION:





AGGREGATOR TRANSFORMATION:







SORTER TRANSFORMATION:






STORED PROCEDURE OR SQL TRANSFORMATION:









RANK TRANSFORMATION:










UNION TRANSFORMATION:












SEQUENCE TRANSFORMATION:







NORMALIZER TRANFORMATION:









TRANSACTION CONTROL TRANSFORMATION:










STRUCTURE PARSER TRANSFORMATION






Introduction to IICS

IICS stands for Informatica Intelligent Cloud Services. It is a cloud-based platform that can be accessed by using a web browser. It is used to integrate, transform, and manage data across cloud applications and Onprem systems.It's a new approach to the old traditional approach of using OnPrem client tools.

There are few difference between Power Center and IICS

- Powercenter is a traditional, on-premise data integration tool, while IICS is a cloud-based data integration platform (SaaS).

- IICS can be accessed via the internet, while PowerCenter requires client applications to be installed on the server.

- IICS can integrate and synchronize data and applications across cloud and on-premise environments. PowerCenter can only access on-premise data sets.

- IICS provides a process developer tool that allows developers to create connectors to access third-party applications. PowerCenter does not have a similar tool.

- IICS is built on a microservices-based architecture, while PowerCenter uses a client-server architecture.



Thursday, November 7, 2024

Date Functions in SQL


Select Getdate() as CurrentDate;

Select Getdate() -1 PreviousDate;

Select Getdate() +1 NextDate;

Select DATEADD(dd,1,getdate()) as NextDate;

Select DATEADD(mm,1,getdate()) as NextMonth;

Select DATEADD(yy,1,getdate()) as NextYear;

Select MONTH(getdate()) as CurrentMonth;

Select EOMONTH(getdate()) as MonthEndDate;

Select EOMONTH(getdate(),1) as NextMonthEndDate;

Select YEAR(getdate()) as CurrentYear

Select DATEDIFF(dd,getdate(),eomonth(getdate())) as NoOfDaysLeftThisMonth;

Select DATEPART(year, CURRENT_TIMESTAMP) as ExtractingYear;

Select DATEPART(year, getdate()) as ExtractingYear;

Sunday, February 19, 2023

SUBQUERIES PRACTISE QUESTIONS

1. Write a SQL query to find those employees who receive a higher salary than the employee with ID 7369.

SELECT * FROM EMP WHERE SAL > 

(SELECT SAL FROM EMP WHERE EMPNO = 7369)


2. Write a SQL query to find out which employees have the same JOB as the employee whose ID is 7369. 

SELECT * FROM EMP WHERE JOB = 

(SELECT JOB FROM EMP WHERE EMPNO = 7369)


3. Write a SQL query to find those employees whose salary matches the lowest salary of any of the departments. 

SELECT * FROM EMP WHERE SAL = 

(SELECT MIN(SAL) FROM EMP )


4. Write a SQL query to find those employees who earn more than the average salary. 

SELECT * FROM EMP WHERE SAL > 

(SELECT AVG(SAL) FROM EMP )


5. Write a SQL query to find those employees who report to that manager whose ENAME is ‘JONES’. 

SELECT * FROM EMP WHERE JOB = 

(SELECT JOB FROM EMP WHERE ENAME = 'JONES')


6. Write a SQL query to find all those employees who work in the SALES department. 

SELECT * FROM EMP E, DEPT D

WHERE E.DEPTNO=D.DEPTNO

AND DNAME='SALES'

OR

SELECT * FROM EMP WHERE DEPTNO =

(SELECT DEPTNO FROM DEPT WHERE DNAME = 'SALES')


7. Write a SQL query to find the employee whose salary is 3000 and empno is 7902.

SELECT * FROM EMP WHERE SAL = 3000 AND empno = 7902


8. Write a SQL query to find those employees whose ID matches any of the numbers 7369,7499 and 7521. 

SELECT * FROM EMP WHERE EMPNO IN (7369,7499,7521)


9. Write a SQL query to find those employees whose salary is in the range of 1000, and 3000 (Begin and end values have included.). 

SELECT * FROM EMP WHERE SAL BETWEEN 1000 AND 3000


10. Write a SQL query to find those employees whose salary falls within the range of the smallest salary and 2500. 

SELECT * FROM EMP WHERE SAL BETWEEN 

(SELECT MIN(SAL) FROM EMP) AND 2500

(Note : AND operators are written always outside of the subquery or closed brackets )


11. write a SQL query to find those employees who do not work in the departments where managers’ IDs are between 100 and 200 (Begin and end values are included.). Return all the fields of the employeess

SELECT * FROM EMP 

WHERE department_id NOT IN

(SELECT department_id FROM DEPT 

WHERE manager_id BETWEEN 100 AND 200);


12. From the following table, write a SQL query to find those employees who get second-highest salary. Return all the fields of the employees. 

SELECT * FROM EMP WHERE SAL  =

(SELECT MAX(SAL) FROM EMP WHERE SAL < (SELECT MAX(SAL) FROM EMP))

OR

select * from

(select empno, ename, sal, deptno, dense_rank() over (order by deptno) as Hsal from emp ) as E

where Hsal = 2;

(Note :- Group by will not work while check 2nd highest salary based on deptno, because operators like '=,<,<=>,>=' is not permitted. So we need to used order by dense_rank to get 2nd highest sal. An extra or external where query should be given to check Hsal )


13. From the following tables, write a SQL query to find those employees who work in the same department as ‘Clara’. Exclude all those records where first name is ‘Clara’. Return first name, last name and hire date.

select first_name, last_name, hire_date from emp where department_id =

(select department_id from emp where first_name = 'clara') AND first_name <> 'clara'

(Note : AND operators are written always outside of the subquery or closed brackets )


14. From the following tables, write a SQL query to find those employees who work in a department where the employee’s first name contains the letter 'T'. Return employee ID, first name and last name.

select * from emp where department_id =

(select department_id from emp where first_name  like 'T%')'


15. From the following tables, write a SQL query to find those employees who earn more than the average salary and work in the same department as an employee whose first name contains the letter 'J'. Return employee ID, first name and salary. 

SELECT employee_id, first_name , salary  

FROM employees  

WHERE salary > 

(SELECT AVG (salary)  

FROM employees ) 

AND  department_id IN 

( SELECT department_id  

FROM employees  

WHERE first_name LIKE '%J%');


16. write a SQL query to find those employees whose department is located at ‘dallas’. 

select * from emp where deptno =

(select deptno from dept where loc = 'dallas')


17. write a SQL query to find those employees whose salary is lower than that of employees whose job title is ‘CLERK’. 

Select * from emp where sal < ANY

(select sal from emp where job = 'CLERK');

Note:- ANY means that the condition will be true if the operation is true for any of the values in the range.)


18. write a SQL query to find those employees whose salary is lower than that of employees whose job title is "clerk". 

select * from emp where sal < ANY

(select sal from emp where job = 'clerk') AND job <> 'clerk'

Note:- ANY means that the condition will be true if the operation is true for any of the values in the range.)


19. write a SQL query to find those employees whose salary exceeds the salary of all those employees whose job title is "salesman". 

select * from emp where sal > ANY

(select sal from emp where job = 'salesman') and job <> 'salesman'

(Note:- ALL means that the condition will be true only if the operation is true for all values in the range)


20. write a SQL query to find those employees whose salaries are higher than the average for all departments. 

select * from emp where sal > ALL

(select avg(SAL) from emp group by deptno )

(Note:- ALL means that the condition will be true only if the operation is true for all values in the range)



Tuesday, March 24, 2020

Teradata

Teradata is used for massive parllel processing(MPP). There are 4 different components of teradata i,e Node, Parsing engine, Message passing unit or Bynet, Access module processor(AMP).

Node :

Parsing engine : It receives queries from clients, checks for syntax errors, checks user privilages, prepares execution plan and pass it to Bynet, lastly receives results from AMP's and sends to client.

Bynet : Message passing layer is also called as Bynet. It allows communication between PE and AMP. It receives execution plan from PE and pass it to AMP, similarly it receives result from AMP and pass it to PE.

Amp : These are called as virtual processors, they actually stores and receives the data.


Teradata supports different types of tables :-
---------------------------------------------

Permanent table : This is a default table, it contains inserted data and stored data permanently.

Volatile table : The data inserted into a volatile table is retained only during the user session. Table and data is dropped at the end of the session. These tables are used to hold the data during data transmission.

Global temporary table : Table is delete at the end of user session.

Derived table :  Derived table holds the intermediate results in a query. Their lifetime is within the query in which they are created, used and dropped.


Set Versus Multiset :-
---------------------
Teradata classifies the tables as SET or MULTISET tables based on how the duplicate records are handled. A table defined as SET table doesn’t store the duplicate records, whereas the MULTISET table can store duplicate records.

Friday, March 6, 2020

Vi Editor

VI EDITOR :-
--------------
VI editor is case sensitive, used in two modes Command mode and Insert mode. By default it starts in command mode, to enter text you must enter into the insert mode. Press letter 'i' to enter into the insert mode. Press 'esc' key to come out of the insert mode, back to the command mode.


COMMANDS :-
---------------

vi Filename : Opens existing file and creates new file, if no file exists.

vi -R Filename : Opens existing file in the read only mode.

vi Filename : Opens existing file in the read only mode.

:w : This command is used to save content of the file.

:q : This command is used to come out of vi editor.

:wq :  This command is used to save and quit from the content of the file.

:q! : This command is used to come out of vi editor, if the file is modified without saving it.  

ctrl + zz : This command is used to save and quit from the content of the file.

:w filename : This command is used to save the specific file.


MOVE WITHIN THE FILE :-
-----------------------------

To move the within the file, you must be in command mode. So press Esc key twice followed by the below words.

k : Moves the cursor one line up.

j : Moves the cursor one line down.

h : Moves the cursor to the left one character position.

i : Moves the cursor to the right one character position.


EDITING THE FILES :-
------------------------

To edit file you need to be in insert mode. Many ways to enter the data into the files are mentioned below.

i : Used to enter into the insert mode and type data as per our requirement.

l : Used to enter text at the begining of the current line.

A : Used to enter text at the end of the current line.

o : Used to create new line below the cursor location.

O : Used to create new line above the cursor location.


DELETING THE CHARACTERS :-
----------------------------------

x : Used to delete the characters under the cursor location.

X : Used to delete the characters before the cursor location.

dw : Used to delete current cursor location to the next word.

d^ : Used to delete current cursor location to the begining of the line.

d$ : Used to delete current cursor location to the end of the line.

D : Used to delete current cursor position to the end of the current line.

dd : Used to delete the line the cursor is on.

Monday, August 5, 2019

Unix Interview Questions

* Command to get Header in unix 
'Head' is used to get header in a file

* Command to check the status of your job 
'Jobs' Command

* Command to stop current task 
'Ctrl+z' Command 

* Command to get current task to back ground
'Bg Jobname' Command

* Command to bring back ground process to fore ground
'Fg Jobname' Command

* Command used to search a string in a file
'Grep' is the command used to search a string in a file.

* SED, AUK command in unix ?

* Have you worked on shell script ?

* Unix command used to save 
Ctrl+D is the command used to save file

* Unix command to clear screen
Ctrl+L command is used to clear screen

* Unix command to display unique line
uniq myfile.txt

* Unix command to display duplicates
uniq -D filename is used to display on duplicates

* 'Touch filename' command result if file already exist
When you run touch on an already existing file, the file's access and modification timestamps are updated to the current time. 

* How to display hidden files
Ls -a

* Command used to kill the running task
Kill or Kill -9

* How to find PID of the process 
PID means process id, unique number of the process. 
PS -EF is used to find pid of the process.

* Command used to transfer files from one server to another server  
FTP command is used

* Command used to know how long server is running
UPTIME command is used

* How do you truncate a file in unix ?
truncate -s 0 filename is used to truncate a file. Here -s means size, 0 is the value of the file to be set. 

* Which unix command is used to enter text at the end of the file?
$ echo "Hello World" >> file.txt 
$ cat file.txt
This is the first line. 
Hello World


* IF FILE IN UNIX CAN'T OPEN, BECAUSE OF NO PERMISSION. HOW TO  RECTIFY IT ?
 

* IF FILE IN UNIX CAN'T OPEN BECAUSE ITS A BIG FILE. HOW TO RECTIFY IT ?
 


List of taskflows in IICS

ICS provides a list of tasks like linear taskflow, taskflow, parallel tasks, parallel tasks with decision, sequential tasks, sequential task...