Table to File using ODI Procedure

Pls help me ...describing what are the steps in ODI need for loading a RDBMS table to File using ODI Procedure....not using Interface and OdiSqlUnload
Thanks in Advance

You can use Java Beanshell or Jython to load data in to a file. The only thing is that you need to create a connection so that you can run the select query and get the resultset. Now write it using your rest code.
If i would have been in your situtation i would prefer Java Beanshell ( not good in jython ;) . Dev can help you on this.). The readymade query is already here
http://odiexperts.com/generate-column_name-header-for-odisqlunload/
Thanks.

Similar Messages

  • How to read I$ table using ODI procedure

    Hi
    Can any one help me how to drop a I$ table from out sie of interface.
    I have tried below approches but no luck
    I have created ODI procedure with technology oracle and target logical schema (I$ tables are creating on target DB) with and with out begin and end;
    Approch 1:
    Given below code in ODi procedure
    drop table <%=odiRef.getTable("L", "INT_NAME", "W")%> <% if (new Integer(odiRef.getOption( "COMPATIBLE" )).intValue() >= 10 ) { out.print( "purge" ); }; %>
    Approch 2:
    drop table I$_<%=odiRef.getTable("L", "TARG_NAME", "A") %>;
    Approch 3:
    drop table <%=odiRef.getTable("L", "INT_NAME", "W")%> (but it is fetching target dtabase schema anme not I$ table)
    Please help me any other alternative way to drop a I$ table, more over this code should be unique for all interface
    Regards,
    Phanikanth

    Thanks bhabani,
    Actaul my requirement is some time my scenario is stoping due some issue at Merge Rows Step (I am using IKM Oracle Incremental Update(Merge) KM) when the next iteration starts it is thwoing and error at create flow table I$ step and error is table name is already exists, so i am doing is if the interface went failed I am storing those information in one table using ODI procedure (INF--ko-->ODI procedure) in same ODI procedure I want to call a I$ table to drop.
    Can you please provide the steps so it will very useful for me using Java variable.
    I have gievn a step as below on create I$ table step (after create I$ statement)
    <@ java.lang.String Idollertable = <%=odiRef.getTable("L", "INT_NAME", "W")%> ; @>
    I am calling Idollertable variable in ODI procedure which is ko>* of INF as <@=Idollertable@>
    Note: I have followed below approch
    ODI Procedure Code:
    drop table <@=Idollertable@>; --> *2nd approch*
    begin
    insert into ODI_EXECUTION_ERROR_DETAILS
    (SESSION_NO,
    SCENARIO_NAME,
    CONTEXT_NAME,
    ERR_MESSAGE,
    INSERT_COUNT,
    ERROR_COUNT)
    values
    <%=snpRef.getSession("SESS_NO")%>,
    '<%=odiRef.getPrevStepLog("STEP_NAME")%>',
    '<%=odiRef.getContext( "CTX_NAME" )%>',
    '<%=odiRef.getPrevStepLog("MESSAGE")%>',
    '<%=odiRef.getPrevStepLog("INSERT_COUNT")%>',
    '<%=odiRef.getPrevStepLog("ERROR_COUNT")%>'
    commit;
    drop table <@=Idollertable@>; --> * first approch *
    end;
    Please help me
    Regards,
    Phanikanth
    Edited by: Phanikanth on Mar 3, 2013 9:52 PM
    Edited by: Phanikanth on Mar 3, 2013 9:52 PM

  • Call a Stored Procedure that returns a REFCURSOR using ODI Procedure

    Hi,
    I have a scenario wherein the stored procedure (TEST_PROC1) that returns a REFCURSOR. The second procedure(TEST_PROC2) will use the REFCURSOR as inpuut and insert it to a table.
    Now, I need to execute the test procedures (TEST_PROC1 and TEST_PROC2) using the ODI Procedure but I always get error. However, I was able to execute the test procedures using sqlplus. Here is the command I used for sqlplus:
                   var rc refcursor
                   exec TEST_PROC1(:rc);
                   exec TEST_PROC2(:rc);
    PL/SQL Stored Procedure:
    -- TEST_PROC1 --
    create or replace
    PROCEDURE TEST_PROC1 (p_cursor IN OUT SYS_REFCURSOR)
    AS
    BEGIN
    OPEN p_cursor FOR
    SELECT *
    FROM test_table1;
    END;
    -- TEST_PROC2 --
    create or replace
    procedure TEST_PROC2( rc in out sys_refcursor ) is
    FETCH_LIMIT constant integer := 100;
    type TFetchBuffer is table of test_table2%RowType;
    buffer TFetchBuffer;
    begin
    loop
    fetch rc bulk collect into buffer limit FETCH_LIMIT;
    forall i in 1..buffer.Count
    insert into test_table2(
    c1, c2
    ) values(
    buffer(i).c1, buffer(i).c2
    exit when rc%NotFound;
    end loop;
    end;
    Is there a way to call a PL/SQL Stored Procedure that returns a REFCURSOR using ODI Procedure?
    Thanks,
    Cathy

    Thanks for the reply actdi.
    The procedure TEST_PROC1 is just a sample procedure. The requirement is that I need to call a stored procedure that returns a cursor using ODI and fetch the data and insert into a table, which in this case is test_table2.
    I was able to execute a simple SQL procedure (without cursor) using ODI procedure. But when i try to execute the SQL procedure with cursor in ODI, I encountered error.
    Do you have any idea how to do this?

  • How to execute .sql file using ODI

    Hi All,
    I need to execute .sql file using ODI.
    I tried @{path}{file} command in ODI procedure selecting oracle technology.but it is failing.
    Do any one have any other idea to execute .sql file.
    Thanks in advance

    Ohk...I think you can try creating batch file(.bat) if its Windows & call that from ODIOSCommand.
    The bat file should contain scripts which call .sql file using sqlplus  & there you can use @{path}{file} format.
    See if this helps.
    Regards,
    Santy

  • How to extract data from Essbase to Flat File using ODI

    Hi,
    Anyone know how to extract data from Essbase to Flat File using ODI?
    Thanks in advance.
    Regards,
    Sumardi

    Hi,
    Have you read through :-
    Oracle Data Integrator Adapter for Hyperion Essbase Getting Started - http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/odiess_getting_started.pdf
    Oracle Data Integrator Adapter for Hyperion Essbase User's Guide - http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/odiess_users.pdf
    If you have read them and are still have a problem at what stage are you having the issues?
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How to assign a value to ODI Variable using ODI Procedure

    Hi ,
    Is it possible to assign a value to a ODI Variable using ODI Procedure ?
    If it is possible how we can do that.
    BEGIN
    IF #Counter=1
    Then
    #Next_Increment:=#Counter+1;
    End if;
    END;
    In my example I have 2 ODI Variables #counter and #Next_increment.
    I am trying to assign VALUE TO A ODI VARIABLE #next_increment from another ODI Variable #counter.
    thanks
    prasanna

    Prasanna,
    I have a similar requirement where I need to assign values to ODI variables within a procedure. How do we make use of an ODI package to accomplish this ?
    Actually, I have a sequence of ODI steps, and there is a call to a procedure 'LOG ERROR' from every step which gets called in case error occurs in any step. I just need to identify from which step the error came.
    Please help.

  • DB2 Version 8 to Flat Files using ODI

    Hi,
    We are trying to load data from DB2 V8 to flat files using ODI.
    Can anybody help me in this to configure server in Topology.
    Thanks
    Ashwini

    Hi,
    How are you? Let me try contribute a little...
    A)
    1) The OS isn't a problem, once you link it at topology will be OK.
    2) If you have a fix name just create a datastore to it, if not, there are techniques to got dynamic file names
    3) When you say "*.dat, *.cvs" maybe you refer to the internal format of file (record separator, decimal point, etc) all of this is configurable on datastore that represents the file at ODI.
    B) Yes, the only requisite is to have the write and read rights.
    C) The most simple way is create a refresh variable that get the data in any format you wish..
    Does it make any sense to you?
    Cezar Santos

  • How to dynamically create sqlldr control file using stored procedure

    I am trying to dynamically create the control file (.ctl) and execute the same using a stored procedure.I would be passing the file name as a parameter to this procedure. How do I go about doing this?
    The control file has the following structure. The file name (mktg) varies and is passed as an input to the stored procedure.
    SPOOL mktg.ctl
    LOAD DATA
    INFILE 'mktg.csv'
    INTO TABLE staging
    FIELDS TERMINATED BY ','
    TRAILING NULLCOLS
    (COMPANY_NAME,
    ADDRESS,
    CITY,
    STATE,
    ZIP)
    SPOOL OFF ;
    sqlldr scott/tiger CONTROL= mktg.ctl LOG=mktg.log BAD=mktg.bad

    We are using oracle 9i rel 2.
    I have not had much success with the creation of log and bad files using external tables when they are being used within a dynamic sql.
    Plz check this:
    Re: problems related to data loads from excel, CSV files into an oracle 9i db

  • How to run exe file using oracles procedure (ASAP) ?

    i am finding difficulties in running an exe file using an oracle procedure.I need this for a pure .NET application

    I want the solution for both,An Oracle stored procedure cannot generally run an executable on the client machine. Stored procedures run on the server and have no access to your client machine. You could potentially do something convoluted like run a web server on the client with an ASP page that called the executable and have the stored procedure make a UTL_HTTP call to the ASP page, but that's generally not an option.
    If the executable is on the server and it's only available as an executable, you could write a Java stored procedure that called out to the command line and invoked the executable (assuming the operating system user running the Oracle database has permission to do so). If the Oracle database is on Windows and you've got 10.2, you may also be able to write a .Net stored procedure that would do the same sort of thing.
    If you can expose the functionality as a DLL, a more elegant solution would be to use an external procedure.
    Justin

  • Conditional Flow using ODI Procedures

    Hello Experts,
    I want to implement if else conditional flow in my ODI procedure. Is it possible to implement this?
    Please help. Thanks in Advance
    -- Harshad

    HI,
    In the ODI page there is a pdf called: oracledi_km_development.pdf
    This manual can tell you a lot about those commands.
    Please, remember to check any questio that was helpful or correct in the post, and to close the post when you think your problem is solved. That will help other users with the same problem.
    Cezar Santos
    [www.odiexperts.com]

  • How to load data from oracle table to XML using ODI ?

    Hello Team
    I am trying to load data from an oracle table to an xml file. I have configured the physical and the logical schemas for the same. I have used SQL to SQL as LKM and SQL to SQL Append as IKM with Sunopsis Memory Engine as staging area.
    After this, when I am executing the interface, it is executed without any errors but to my surprise I am not finding the relevant data in the xml file. What could be the reason ?
    Please look into this and lemme know how to solve it.
    Thanks.

    908458 wrote:
    Hello Phanikanth
    Even IKM SQL Control Append is not solving the problem. There are many " order columns" in the target xml table. I have not mapped them or specified any order. Does the problem persist because of this ?
    Thanks
    Manoj
    Ocle to XML file loading issue in ODI 10.1.3.5

  • How to use ODI procedures into a ODI variable

    Hi,
    I have the below condition
    select c1 from table where c1>#ODIVAR1 and use the output of this query in a variable to define the package flow
    If output=0 package flow goes as XXX
    else
    flow goes as YYY.
    So please suggest how to use a ODI variable to capture the procedures putput and use it in package flow in this case.
    Thanks,
    Naveen.

    Step1 . Refresh the variable in the package, which have this query select c1 from table where c1>#ODIVAR1
    Step2. Evaluate above variable (operator = , value 0 )
    Step 3. If true Package flow xxx , else false yyy
    Please close the thread once you get the required flow.

  • Populating XLS file using ODI

    Hi,
    I have a requirement i will receive on a daily basis a file from SAP having some data.I need to integrate the data coming in a XLS file.
    What i know till now is i can create Oracle table from the Text file.
    Now i would like to know if there is any way to create Excel file from that database?
    If yes how could i achieve that?
    Thanks,
    Mahesh

    Hi Mahesh
    This is already given in oracle blog ( Using Microsoft Excel as a Target in an Interface ).
    https://blogs.oracle.com/dataintegration/entry/using_microsoft_excel_as_a_sou
    Thanks.

  • I am trying to extract metadata from essbase into a flat file using ODI.

    I have 2 questions in this regard :
    Some of the account members storage property is missing in the extract.the reason which i suspect is due to the parent child sorting that did not happen while extracting.How do i do this.I do not see this option when i select IKM hyperion Essbase Metadata to SQL....
    I have many account members that have more than one UDA's upto 5 UDA's.But in my extrcat only one UDA appears.How do i incorporate all the UDA's in a single column,sperated by a comma,the extract file as such is semicolon seperated,mainly because of this reason and some alias descriptions have comma's in the source system
    ODi is extracting metadata in a descending order.How do i change it to sort records in parent child order
    Thanks,
    Lingaraj
    Edited by: user649227 on 2009/06/10 6:50 AM

    Hi,
    There was an issue with early versions of the KM around the storage property, this has since been resolved. I recommend upgrading to the latest release of ODI or have a look through the patches.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Loading Data from multiple tables into essbase using ODI

    Hi,
    We have a scenario where data comes from multiple tables. I would like to know how will ODI load this data for the right combination of the members

    Hi,
    I take it each data table has a field which maps to the other table. You can just drag the datastores on to the source interface and create a join between the tables.
    Cheers
    John
    http://john-goodwin.blogspot.com/

Maybe you are looking for

  • Calendar on iPad (OS7.0.4) does not show home calendar events

    I can create an event on my ipad, but it does not show up on the calendar.  It does show up in icloud and iphone, but not on the ipad.  Likewise I can create events on my iphone and icloud.  Those events show up on the iphone and icloud, but not the

  • BAPI_SCEC_CREATE - how to get the shopping cart to go to our workflow

    Dear experts, When a shopping cart is created using BAPI_SCEC_CREATE, it will get approved automatically. We want the shopping cart to go through our approval workflow. Is there any way to achieve this? I saw threads on similar question but there's n

  • SelectionRange for BAPI_USER_GETLIST_INPUT

    Hi Experts, I'd like to set the username value of the BAPI import parameter "SelectionRange" when initiating the controller. This parameter is type of AbstractList. The ABAP documentation within the R/3 System -> BAPI Explorer tells me the following

  • Sql *plus Update

    Please look into this How can I upgrade sql* plus release 10 for 10g do i have to apply patch or install something on my machine SQL*Plus: Release 9.2.0.1.0 - Production on Mon May 14 11:01:36 2007 Copyright (c) 1982, 2002, Oracle Corporation.  All r

  • How to change notification_preference for wf_local_role :ECX_SA

    Hi , We are not getting XML Gateway error notifications.Then i found that notification_preference for wf role :ECX_SA should be MAILHTML. Output of below query at my env is: select notification_preference, expiration_date from wf_local_roles where na