Wednesday, 9 June 2021

Abinitio Basic Concepts 2021-

 

1 ) what will happen if you specify the commit number as 0? 

Ans - The default value is zero- this means no commit until the component completes execution.

2) Significance of commit number and commit table? 

Ans - A commit table is used to keep track of records committed to a database during execution.
commit number - Number of records per commit checkpoint

3) .profile and .abinitiorc content ?

         Ans - .profile contain -

AB_HOME
AB_AIR_ROOT
AB_CONNECTION
,AB_USERNAME
AB_APPLICATION_HUB
oracle_home
 

.abinitiorc contains –  

AB_EME_DATASTORES
AB_NODES
AB_AIR_ROOTS
AB_DISPLAY_NAMES
AB_AIR_HOME
AB_WORK_DIRECTORY
AB_AIR_BRANCHES
AB_AIR_ROOT
AB_CONNECTION
AB_SSH_NEED_PASSWORD
AB_USERNAME 

4) Teradata error code - 12 ? 

Ans - Database ran temporarily out of space, This can occur on an unload when the database runs out of spool space.

Monday, 7 June 2021

Ab initio and Unix Questions 2021 -

1 ) Reverse a string in Abinitio and Unix? 

Example - abinitio to oitiniab 

 Abinitio - Use Reformat and in Transformation use below logic - out.field1::in.field1[::-1] 

 Unix - echo abinitio | rev 

 2) Assign Default value as NULL to vector field?

 DML - 
 Record 
string(|) name; 
decimal(|) array_size; 
record string(|) code; 
end[array_size] code subrec; 
end

 let's say want to assign a null value to the code field? 

 use allocate_to_nulls(); 

 3) i/p - a b c d o/p- ab bc cd how to achieve this scenario?

 hint - Rollup with null key, concatenate all records, we will get abcd next use normalize ,keep length as string_length(in.col) -1; use substring to get the records.

 4) Unix script that will read table name from a txt file and give the record count with the table name, we have to use m_db command the output should look like below 

 o/p- 
 Tablename|Record Count
 table1|10
 table2|15 
 table3|200

Note - create a simple txt file which will contain Tables name, create Unix script which will read the table name from the txt file, and use m_db unload dbcfile.dbc -select 'select count(*) from tablename' to get the record count.

5) Assign a sequence number to multifile ?
Note - (next_in_sequence() -1)*no_of_partitions() + this_partition() +1



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 ...