Sunday, 18 April 2021

Mindtree Ab initio Interview Questions 2021 -


1) Difference between AB_WORK_DIR and AB_DATA_DIR?

AB_WORK_DIR - > Default value - /var/abinitio

Specifies the storage directory for temporary files written by co>operating system when running a job. Because this directory contains a recovery file, it is crucial that its file system never filled up.

AB_DATA_DIR ->  Default value - /~ab_work_dir/data

Temporary data files written during job execution by components that lack a specific ,writable path in their layouts(including for dynamic layout)

2) Difference between .abinitiorc and abinitiorc which will take precedence if we will define parameters both in abinitiorc and .abinitiorc?

abinitiorc -  global configuration file (/etc/abinitio/abinitiorc)

A configuration variable set in this file will take precedence over any other variable set for that configuration variable, which means that variables set in this file are both global and cannot be overwritten.

.abinitiorc - $HOME/.abinitiorc

3) city distance scenario 

4) count(*) and count(1) difference in SQL ? why we are using it?

Count(*) - Count total rows in the table , including the null value.

Count(1) - Count using the first column: primary key. Count (1) is using the index to count rows and it is faster than the count(*).

The result of count(*) and count(1)  are identical.

5) Separate header, trailer, and body record from a multifile without any indicator in input DML?

6) now() and now1() difference? - 

now() gives the time at the point of time.

 now1() gives a consistent point of time for the duration of the graph execution from the point of the first call.

7) What is skew?

8) Create a Generic graph to read 50 tables from a file and process it.

9) Question from example > cookbook> gendiff  > generic_difference_pdl.mp

10) 2nd highest Salary in Abinitio? - scan - rank function set to 2.

11) 2nd Highest Salary in SQL?

1st Query -  select max(salary) from table_nm where salary < (select max(salary) from table_nm)

2nd Query - SELECT salary 
FROM (
  SELECT salary, ROW_NUMBER() OVER (ORDER BY salary DESC) AS row_num
  FROM employees
) AS subquery
WHERE row_num = 2;

In this query, we are selecting the salary column from a subquery that first sorts the employees table by salary in descending order and assigns a row number to each row using the ROW_NUMBER() function. Then, in the outer query, we select the salary from the subquery where the row number is 2, which corresponds to the second-highest salary.

Note that this query assumes that there are at least two employees in the table with different salaries. If there is only one employee in the table, the query will return no results. If there are multiple employees with the same highest salary, the query will return the next highest unique salary.

3rd Query - SELECT salary
FROM (
  SELECT salary, DENSE_RANK() OVER (ORDER BY salary DESC) AS rank
  FROM employees
) AS subquery
WHERE rank = 2;

No comments:

Post a Comment

how to create dml dynamically in Ab-initio

 $[ begin let int i = 0; let string(int) complete_list = "emp_nm,billable,age,designation,location"; let string(int) file_content ...