What is difference macros and prompts?

Answers were Sorted based on User's Feedback



What is difference macros and prompts?..

Answer / nmlabsonline.net

Macros is nothing but a conditions Total in project level
but prompt is dynamic condition (in Repositary level) this
is implimenting report level in particular filter
condition.......

Is This Answer Correct ?    0 Yes 0 No

What is difference macros and prompts?..

Answer / janardhanreddy

Macro: It is a collection of SQL queries preferably DML statments and it is stored as an object in DD(Data Dictionary). Unlike VIEWS (we will deal about Views in another post), a macro can have multiple sequels. It is known that a macro can handle many DML and it is restricted to only one DDL.

Reason: DDL statements like Create,Alter,Drop,Rename generally locks the DD for their processing, since macros transaction is an internal process it is highly dependent on DD. Therefore DDL can be last statement in a macro. - This is what provided as theoretical explanation .

Example:
CM AS // CM doesnt work with Queryman better try with BTEQ
or
CREATE MACRO MyMacroName AS
(
insert into (eno,name,ereqno) emp values (101,'Rajesh',43243259);
select * from emp;
//DDL stmt here (doesnt work with queryman)
)
Issue: There is an issue with macro that, DDL couldnt be even as last statement in a macro(with Queryman). I used Teradata 12 and I am getting Warning as Data Dictionary must be solitary. I will update after working with BTEQ.

Parameterized Macro:
//paramNum is passed as Parameter to Select statement.
//passed parameter shd be accessed using =:paramname

CREATE MACRO macro_name (paramNum integer) AS
{
DMLs here....
select ename,esal from emp where eno = :paramName ;
};

REPLACE Macro:

If you require more DMLs to be added to an existing macro, you can use
REPLACE MACRO AS
{[insert];
[update];
[delete];
[select];);

To Execute Macro:

EXEC []
eg: exec myfirsmacro_name;
exec myfirsmacro_name (invalue=1,invalue='abc');

To Drop:
DROP MACRO macro-name;

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Informatica Interview Questions

what happens when a batch fails?

3 Answers  


Input is like 1 1 1 2 2 3 and out put should be 1 2 3 How can u acheive using rank transformation ??

3 Answers   IBM,


write sql query to remove null value following table id name 101 dinesh null jyothi null bharathi 102 suresh null shilpha 103 prakesh null suma i want the output id name 101 dinesh 102 suresh 103 prakesh

5 Answers   Accenture,


write sql query to filter the null value data following table? name age john 30 smith null null 34 sharp 24 i want the output following are name age john 30 sharp 24

2 Answers   HP,


How do you update the records with or without using update strategy?

0 Answers  






is there any way to read the ms excel datas directly into informatica?like is there any possibilities to take excel file as target?

0 Answers  


What is rank transformation?

0 Answers  


what is session parameters?

1 Answers   Cap Gemini,


hOW CAN WE DELETE A RECORD OR TRUNCATE IN TARGET TABLE USING SQL T/R ?

4 Answers  


Explain what are the different types of transformation available in informatica.

0 Answers  


write asql query to filter improper date format? date 20-apr 11-mar-2010 30-may-2010 feb-2009 i want the output date 11-mar-2010 30-may-2010

2 Answers   Accenture,


What are ETL Tools?

0 Answers   Informatica,


Categories