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

suppose in my source flatfile i have 10000 records in that some of master table records missed table records missed then what will u do

0 Answers   Patni,


Why update strategy and union transformations are active? Explain with examples.

0 Answers  


What are the types of schemas we have in data warehouse and what are the difference between them?

0 Answers  


What are the rank caches?

2 Answers   Informatica,


1:when we develop a project what are the performance issue will raise?? KPIT 2:if a table have INDEX and CONSTRAINT why it raise the performance issue bcoz when we drop the index and disable the constraint it performed better??KPIT 3:what are unix commands frequently used in informatica??

1 Answers   KPIT,






server hot-ws270 is connect to Repository B. What does it mean?

0 Answers   Cognizant,


In a mapping i have three dimensions. If i want to pass a same surrogate key value to all the three dimensions by using one sequence generator is possible?If the mapping is containing single flow? And in the same case if the mapping is contaning 3 flows for the three dimensions then by using one sequence generator can we populate surrogate key (same value) to all the three dimensions?

6 Answers   IBM,


write sql query following source table jan feb mar apr 100 200 300 400 500 600 700 800 900 100 200 300 i want the output format like month total jan 1500 feb 900 mar 1200 apr 1500

3 Answers   Accenture,


hi all my source looking like below column1 column2 101,102,103 abc,def,ghi 1001,1002,1003 a,b,c i want my target is column1 column1 101 abc 102 def 103 ghi 1001 a 1002 b 1003 c any one can you help

1 Answers  


how to return multiple columes through through un-connect lookup?

1 Answers   DELL,


WHAT IS FACT TABLES?

2 Answers  


in which situations do u go for scds ?

3 Answers   TCS,


Categories