Abinitio Interview Questions
Abinitio Interview Questions
Step1 : Input records will be fed to " partition by round robin "
Component.
Step2 : The "block size" parameter of the component shoud be set to 20
in order to send first 20 records to first partition.
Step3 : Now we can connect the output of " partition by round robin " to
five different files.
Step4 : The output files will have 20 records each.
OR
Step1 : we can use reformat with global variable count with initial value
as 0 which will be incremented by 1 for each record till 20 then will
again be set to 1.
Step2 : Also add one new fiels which is "file_name" whic will be updated
after every 20th record.
Step3 : The output of the record then should be fed to " Write Multiple
Files " component which will write records into files defined by
"file_name" field we declared in reformat.
Step4 : The output files will have 20 records each.
Q: Difference between output index and output indexes in reformat
component of AbInitio?
These kind of abinitio interview questions will test the basic
understanding of reformat component of abinitio.
Ouput Index:
Suppose you have 100 records in input file. Within reformat
parameters, you can choose number of outputs you want. Within those
outputs, you can divide input into number of records you want in each
output The total sum of records will remain 100 as that of input
records. you can apply only one tranfor or logic within reformat to a
particular record. this means input record can be moved to only one
output port
Ouput Indexes:
But in ouput indexes you can pass the input record to multiple output
ports. This means multiple transforms can be appied to the same record
and output record count can be greater that input record count.
One record can be passed to one One record can be transferred to mutiple
output port only. output ports.
We can use plan. In plan we can add subplan, inside which we can add
graph task to call graph. The subplan can now be configured with
"whileloop" and condition as "True". With this condition as true in
subplan properties, the process will run in loop continuously again and
again.
Q: Difference between lookup and local lookup?
Both lookup and lookup_local functions are used to lookup data on a
lookup files based on keys.
But lookup_local function is used when our lookup file is partitioned.
This will be advantageous only when you are looking up on the same
key on which lookup file is partitioned
Q: function of lookup last in Ab Initio?
lookup_last function returns the last record from the lookup file which is
matching the lookup keys.
Q: Calculate number of vowels in a string using AbInitio graph?
One of the solution is as below:
Step1 : Input records will be fed to "Redefine format" Component.
Step2 : with the help of redefine format , we can read the string with
letters only with dml like - "String(1)". this will read each letterand
output each letter as a record. therefore number of record will be equal
to number of letters in the string.
Step3 : the output of bove will be fed to "Filter By expression"
component where we will filter only vowels like member[vector "A", "E",
"I", "O", "U"]
Step4 : The output will have records only vowels which can be fed to
rollup with same key as field name and we can use count function
Step5 : the above output will give vowels and its count in records..
Q: How to reverse a string using AbInitio ?
There can be many ways to solve this interview question but there is
also a simple way that abinitio provides which is slice option
Suppose you have a string coming as input : "Account"
Now you can reverse this string with slice function of abinitio as below:
in.data[::-1]
In the above statement, "in.data" holds the value of a string which is
being reversed. The output of above function will be "tnuoccA".
Q: What are the roles of Co-Op or co-operating system in Abinitio ?
Below are the roles of co-op :
Manage and run Ab Initio graph and control ETL process.
Provides abinitio extension to the operating system.
ETL processing along with monitoring and debugging.
Metadata management and interaction with EME.
Q: What is an ICFF file in Abinitio and when would you use one ?
ICFF or Index Compressed Flat File is a kind of lookup file that can store
very high volume of data while also providing quick access to individual
records.
Advantages:
# In normal lookup there is a limit to keep data bu in ICFF, we can keep
high volume of data without overloading physical memory.
# Requirement of disk space is less than database.
# High speed of transaction.
# High performance as compared to DB.
Working Of ICFF:
ICFF is actually a combination of two files : one is data file and an index
file. These two files combined makes an ICFF file.
ICFF stores data in data blocks which are in data file and index file
contains pointers back to individual data blocks.
During lookup opertion most of the compressed lookup data remains on
disk and the graph loads only tiny index file into memory.
ICFF Keys:
# Should have fixed length
# Should be not null
Q: How to create an ICFF File ?
ICFF or Index Compressed Flat File is created by using " Write Block
Compressed Lookup " component of Ab initio.
This component has one input and two outputs.
As we already know, ICFF file is combination of two files : one is data
file and an index file
Input data is fed to the input port. For output, data file is connected to
output data port and index file is connected to out index port .
With this, data file will be written in data file and indexes will be
written in index file.
DML of data file will be the DML of data and index file will have DML as
void.
You have to configure the component " Write Block Compressed Lookup
" where you will need to add keys on which you want to create ICFF .