ODI - Use Method GetPrevSteplog

Oracle Business Intelligence, Oracle Warehouse Builder OWB, Oracle Discoverer, BI Publisher, XML Publisher, OLAP, Data Mining, ODI Oracle Data Integrator, etc
Post Reply
User avatar
gpereira
Rank: Programador Sênior
Rank: Programador Sênior
Posts: 61
Joined: Sat, 10 Dec 2011 10:56 am
Gustavo Antonio Pereira
OCA Oracle Database 10g Administrator Certified Associate

Hi everyone, how are you?

After mapping tables and develops interfaces in ODI, I have developed the packages.

In the packages, I am intending to develop procedures for logging in a freehand in the destination scheme.

I then found the GetPrevSteplog method, which would suit me in every way.

occurs that using some parameters of this method, error is issued in the procedure "ORA-00936: Missing Expression", the funny thing that with some works.

Select all

INSERT INTO <%=odiRef.getSchemaName()%>.RESUMO_ODI_CARGAS ( 
ID_CARGA,  
PACOTE,  
DT_CARGA_INI,  
DT_CARGA_FIM,  
STATUS,  
SESSAO_ORACLE,  
QTD_REGISTROS,  
ERRO,  
DURACAO) 
 
SELECT   
<%=odiRef.getSchemaName()%>.SEQ_RESUMO_ODI_CARGAS.NEXTVAL, 
'01 - CARREGA CLIENTE',  
<%=odiRef.getPrevStepLog("BEGIN")%>,  
<%=odiRef.getPrevStepLog("END")%>, 
DECODE(<%=odiRef.getPrevStepLog("STATUS")%>, 'D', 'SUCESSO', 
					'E', 'INSUCESSO', 
					 'DESCONHECIDO'),			 
#GET_SESSION_ODI, 
<%=odiRef.getPrevStepLog("INSERT_COUNT")%>, 
<%=odiRef.getPrevStepLog("MESSAGE")%>, 
<%=odiRef.getPrevStepLog("DURATION")%> 
FROM DUAL
Using Duration and Insert_Count works well, but with all other parameters and issued error "ORA-00936: Missing Expression".

Does anyone have any idea what it is?

Hugs.
User avatar
gpereira
Rank: Programador Sênior
Rank: Programador Sênior
Posts: 61
Joined: Sat, 10 Dec 2011 10:56 am
Gustavo Antonio Pereira
OCA Oracle Database 10g Administrator Certified Associate

Personnel, resolved with formatts below:

Select all

substr('<%=odiRef.getPrevStepLog("STEP_NAME")%>', 1, 100), 
TO_CHAR(cast(to_timestamp('<%=odiRef.getPrevStepLog("BEGIN")%>','YYYY-MM-DD HH24.MI.SS.FF3') as date),'DD/MM/YYYY HH24:MM:SS'), 
TO_CHAR(cast(to_timestamp('<%=odiRef.getPrevStepLog("END")%>','YYYY-MM-DD HH24.MI.SS.FF3') as date),'DD/MM/YYYY HH24:MM:SS')
Thanks.
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 8 guests