How to get source table inside Template Mapping code template

Hi guys,
I have the following scenario, I have an table from external database and want to map it to an oracle table. This is done with Template mapping and I selected an Load code template on the execution unit that holds only the external table, this load code template will read row by row from source table and make the inserts into the flow table. I know that oracle use odiRef.getFrom() in order to construct the select statement from the external table. Because i need to do something custom i will need to have a list of the source tables inside the Load code template.
Is this possible?
P.S. I use owb 11gr2.
Regards,
Cipi
Edited by: Iancu Ciprian on Jan 11, 2011 10:58 AM

Hi Suraj,
Thx for your answer!
After posting the message i found in ODI documentation about odiRef other function and this I'm trying now to see if works, will let you know my results ...
I implemented an custom iterator that retrieves the data from an external source and pass it to INSERT commands to execute against flow table. In order that this iterator to work i need the source table name of the current execution unit. Then the iterator is using the that name to get the data from the external entity and retrieve it as an array of Objects, this array of objects will be inserted in the flow table.
Regards,
Cipi

Similar Messages

  • How to get source table name according to target table

    hi all
    another question:
    once a map was created and deployed,the corresponding information was stored in the repository and rtr repository.My question is how to find the source table name according to the target table,and in which table these records are recorded.
    somebody help me plz!!
    thanks a lot!

    This is a query that will get you the operators in a mapping. To get source and targets you will need some additional information but this should get you started:
    set pages 999
    col PROJECT format a20
    col MODULE format a20
    col MAPPING format a25
    col OPERATOR format a20
    col OP_TYPE format a15
    select mod.project_name PROJECT
    , map.information_system_name MODULE
    , map.map_name MAPPING
    , cmp.map_component_name OPERATOR
    , cmp.operator_type OP_TYPE
    from all_iv_xform_maps map
    , all_iv_modules mod
    , all_iv_xform_map_components cmp
    where mod.information_system_id = map.information_system_id
    and map.map_id = cmp.map_id
    and mod.project_name = '&Project'
    order by 1,2,3
    Jean-Pierre

  • How to get source table name

    Hi,
    I need to know how get a source table name. I need to get a source table name and do some transformation. I am adding the step in IKM to do this and therefore need source table name in there.
    <%=odiRef.getSrcTablesList("","[RES_NAME]","","")%> gives work table name (C$_0XXXXX) whereas actual source table name is expected.
    Could someone please help?
    Thanks.

    Hi,
    May i add a point?
    In IKM level, if u use this API it will always return u C$ table name only since for IKM C$ is the source. You need to capture and use this API in LKM level.
    In LKM add a step in Command on target and technology as Jython and try the below code.
    mySourceTable= '<%=odiRef.getSrcTablesList("", "[RES_NAME]", ", ", "")%>'
    And later in IKM use this variable for ur transformation.
    Thanks,
    Guru

  • How to get the table of value field? and can we expand the technical limits

    Dear
    I have created value field in COPA with KEA6. And now, I need the table which the value fields are saved. Yet, I have tried a lot to find it and get failure? Can any guy help me? Please tell me how to get the table of a value field.
    And another question is that, can we extend the technical limits for the number of value field for ECC6.0?
    We have a note for R.4.x Please see below:
    OSS note 160892
    You can display the length of a data record using Transaction KEA0 ('Maintain Operating Concern'). After you have navigated to the 'Characteristics Screen' or to the 'Value field Screen' choose menu path 'Extras -> Technical Limits'.
    The maximum displayed here under 'Length in bytes on the DB' is the maximum length permitted by the Dictionary. The reserve required for the release upgrade must be subtracted from this value.
    To increase the allowed number of the value fields, increase the value that is assigned to field ikcge-bas_max_cnt (FORM init_ikcge_ke USING fm_subrc, approx. line 165) in Include FKCGNF20. It specifies the number of the possible value fields. The corresponding part of the source code is attached to the note as a correction.
    David Sun
    Regards!

    how to extend the limit of value numbers? please see the original question.

  • How to reference source table in procedure?

    I created a procedure with only 1 sql statement:
    delete * from source_table_name@connector where ...
    I put this procedure in pre-mapping, then validate, pre-deploy are both ok, but when I deployed it, it caused "cannot find table or view" error.
    How to reference source table in the procedure? Thanks.

    anybody helps??? Please.
    Thanks.

  • How to get internal table from SAP Data Provider C#

    Hello.
    ABAP:
       DATA: lt_t001 TYPE TABLE OF t001.
       DATA: url(1000) TYPE c.
      SELECT * INTO TABLE lt_t001 FROM t001.
      CALL FUNCTION 'DP_CREATE_URL'
        EXPORTING
          type                 = 'APPLICATION'
          subtype           = 'X-R3TABLE'
        TABLES
          data                 = lt_t001
        CHANGING
          url                    = url
        EXCEPTIONS
          OTHERS           = 4.
    C#:
    using SAPDataProvider;
    using SAPTableFactoryCtrl;
    public void SetDataFromUrl(string url)
                SAPDataProviderClass p = new SAPDataProviderClass();
                p.SetDataFromURL("APPLICATION", "X-R3TABLE", url);
                ISapDPR3Table tbl = p.GetDataAsR3Table("APPLICATION", "X-R3TABLE");
                SAPTableFactoryClass tf = new SAPTableFactoryClass();
                Table tb = (Table)tf.NewTable();
                tb.ISAPrfcITab = tbl.DataTable; // Exception !!!!!!
    How to get internal table from SAP Data Provider ?

    Hi Sergey,
    I'm trying to do the same, have you found a solution to solved it?
    thanks for your help.
    Regards.
    Jonathan

  • How to get pivot table by using dates

    Hi,
    How to get pivot table by using dates in column.
    Below is the sample table and its value is given.
    create table sample1
    Order_DATE       DATE,
    order_CODE       NUMBER,
    Order_COUNT   NUMBER
    Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('30-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),1,232);
    Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('30-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),2,935);
    Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('30-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),3,43);
    Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('30-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),4,5713);
    Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('30-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),5,11346);
    Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('29-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),1,368);
    Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('29-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),2,1380);
    Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('29-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),3,133);
    Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('29-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),4,7109);
    Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('29-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),5,14336);
    select * from sample1;So how to get the data like below.
              order_date
    order_code 30-sep-12 29-sep-12
    1 232 368
    2 935 1380
    3 43 133
    4 5713 7109
    5 11345 14336

    Using the extra data I inserted in my previous reply:select ORDER_CODE,
    SUM(DECODE(extract (month from ORDER_DATE),1,ORDER_COUNT,0)) JAN,
    SUM(DECODE(extract (month from ORDER_DATE),2,ORDER_COUNT,0)) FEB,
    SUM(DECODE(extract (month from ORDER_DATE),3,ORDER_COUNT,0)) MAR,
    SUM(DECODE(extract (month from ORDER_DATE),4,ORDER_COUNT,0)) APR,
    SUM(DECODE(extract (month from ORDER_DATE),5,ORDER_COUNT,0)) MAY,
    SUM(DECODE(extract (month from ORDER_DATE),6,ORDER_COUNT,0)) JUN,
    SUM(DECODE(extract (month from ORDER_DATE),7,ORDER_COUNT,0)) JUL,
    SUM(DECODE(extract (month from ORDER_DATE),8,ORDER_COUNT,0)) AUG,
    SUM(DECODE(extract (month from ORDER_DATE),9,ORDER_COUNT,0)) SEP,
    SUM(DECODE(extract (month from ORDER_DATE),10,ORDER_COUNT,0)) OCT,
    SUM(DECODE(extract (month from ORDER_DATE),11,ORDER_COUNT,0)) NOV,
    SUM(DECODE(extract (month from ORDER_DATE),12,ORDER_COUNT,0)) DEC
    from SAMPLE1
    where trunc(order_date, 'YY') = trunc(sysdate, 'YY')
    group by order_code
    order by order_code;
    ORDER_CODE JAN FEB MAR APR MAY JUN JUL AUG   SEP   OCT NOV DEC
             1   0   0   0   0   0   0   0   0   600   600   0   0
             2   0   0   0   0   0   0   0   0  2315  2315   0   0
             3   0   0   0   0   0   0   0   0   176   176   0   0
             4   0   0   0   0   0   0   0   0 12822 12822   0   0
             5   0   0   0   0   0   0   0   0 25682 25682   0   0Now a bit of explanation.
    1) Whenever you pivot rows to columns, no matter what version of Oracle and no matter what method you use, you have to decide in advance how many columns you are going to have and what the names of the columns are. This is a requirement of the SQL standard.
    2) I use the WHERE clause to get just the data for this year
    3) With EXTRACT, I get just the month without the year.
    4) Using DECODE, I put every month's data into the correct column
    5) Once I do all that, I can just GROUP BY order_code while SUMming all the data for each month.

  • How to get the table with no. of records after filter in webdynpro

    Dear Gurus,
    How to get the table with no. of records after filter in webdynpro?
    Thanks in advance.
    Sankar

    Hello Sankar,
    Please explain your requirement clearly so that we can help you easily.
    To get the table records from your context node use method get_static_attributes_table()
    data lo_nd_mynode       type ref to if_wd_context_node. 
    data lt_atrributes_table  type wd_this->elements_mynode. 
    lo_nd_mynode = wd_context->get_child_node( name = wd_this->wdctx_mynode ). 
    lo_nd_mynode->get_static_attributes_table( importing table = lt_atrributes_table ). 
    Note: You should have already defined your context node as a Dictionary Structure.
    BR,
    RAM

  • How to get nested table meta data

    how to get nested table column name, column type and column size
    by using java. i need code for this.
    please help me.

    The Follopwing program does display the the details of table. Hope you get the solution
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.ResultSetMetaData;
    import java.sql.Statement;
    public class Main {
      public static void main(String[] args) throws Exception {
        Connection conn = getOracleConnection();
        System.out.println("Got Connection.");
        Statement st = conn.createStatement();
        st = conn.createStatement();
        ResultSet rs = st.executeQuery("SELECT * FROM SCHEDULE_SET");
        ResultSetMetaData rsMetaData = rs.getMetaData();
        int numberOfColumns = rsMetaData.getColumnCount();
        System.out.println("resultSet MetaData column Count=" + numberOfColumns);
        for (int i = 1; i <= numberOfColumns; i++) {
          System.out.println("column MetaData ");
          System.out.println("column number " + i);
          // indicates the designated column's normal maximum width in
          // characters
          System.out.println(rsMetaData.getColumnDisplaySize(i));
          // gets the designated column's suggested title
          // for use in printouts and displays.
          System.out.println(rsMetaData.getColumnLabel(i));
          // get the designated column's name.
          System.out.println(rsMetaData.getColumnName(i));
          // get the designated column's SQL type.
          System.out.println(rsMetaData.getColumnType(i));
          // get the designated column's SQL type name.
          System.out.println(rsMetaData.getColumnTypeName(i));
          // get the designated column's class name.
          System.out.println(rsMetaData.getColumnClassName(i));
          // get the designated column's table name.
          System.out.println(rsMetaData.getTableName(i));
          // get the designated column's number of decimal digits.
          System.out.println(rsMetaData.getPrecision(i));
          // gets the designated column's number of
          // digits to right of the decimal point.
          System.out.println(rsMetaData.getScale(i));
          // indicates whether the designated column is
          // automatically numbered, thus read-only.
          System.out.println(rsMetaData.isAutoIncrement(i));
          // indicates whether the designated column is a cash value.
          System.out.println(rsMetaData.isCurrency(i));
          // indicates whether a write on the designated
          // column will succeed.
          System.out.println(rsMetaData.isWritable(i));
          // indicates whether a write on the designated
          // column will definitely succeed.
          System.out.println(rsMetaData.isDefinitelyWritable(i));
          // indicates the nullability of values
          // in the designated column.
          System.out.println(rsMetaData.isNullable(i));
          // Indicates whether the designated column
          // is definitely not writable.
          System.out.println(rsMetaData.isReadOnly(i));
          // Indicates whether a column's case matters
          // in the designated column.
          System.out.println(rsMetaData.isCaseSensitive(i));
          // Indicates whether a column's case matters
          // in the designated column.
          System.out.println(rsMetaData.isSearchable(i));
          // indicates whether values in the designated
          // column are signed numbers.
          System.out.println(rsMetaData.isSigned(i));
          // Gets the designated column's table's catalog name.
          System.out.println(rsMetaData.getCatalogName(i));
          // Gets the designated column's table's schema name.
          System.out.println(rsMetaData.getSchemaName(i));
        st.close();
        conn.close();
      public static Connection getOracleConnection() throws Exception {
        String driver = "oracle.jdbc.driver.OracleDriver";
        String url = "jdbc:oracle:thin:@son15644:1521:CXPqa1";
        String username = "ess4qa2";
        String password = "ess4qa2pw";
        Class.forName(driver); // load Oracle driver
        Connection conn = DriverManager.getConnection(url, username, password);
        return conn;
    }

  • How to get updated table values from objectlistdataproviders

    how to get updated table values from objectlistdataproviders

    Hi,
    Here is a sample code
    start-of-selection.
    *Select the data you need into an internal table
      loop at it_mara into wa_mara.
    data that needs to be displayed in the output list
        write:/ box as checkbox,
                wa_mara-matnr under text-001,
                wa_mara-maktx under text-002,
                wa_mara-lgort under text-003.
    Hide the data that needs to moved to internal table
        hide:wa_mara-matnr, wa_mara-maktx, wa_mara-lgort.
      endloop.
      clear wa_mara.
    end-of-selection.
      lines = sy-linno.
    at line-selection.
      clear:it_matnr. 
      do lines times.
        check sy-index > 1.
        box = space.
        read line sy-index field value box.
        if box = 'X'.
    *data selected using check box is moved to internal table
          append wa_mara to it_matnr.
        endif.
      enddo.
    Regards,
    Jisha.

  • How to get af:commandbutton id in java code when it is triggered?

    Hi All
    In my application's homepage, I am using 2 af:commandbuttons and each using action attribute to call a method. Both are calling the same method, and based on its id, it should perform different operations. Could anyone please tell me how to get command buttons id in java code, when it is triggered.
    Regards
    Venkat

    Venkat,
    why not call different methods from each button?
    public String actionButton1()
    return doAction("button1");
    public String actionButton2()
    return doAction("button2");
    public String doAction(String aBuuton)
    if ("button1".equalsIgnoreCase(aButton))
    // do work for button 1
    return "abc";
    }else {
    // do work for button 2
    return "abc";
    }Now you user actionbutton1 for the first button and actionButton2 for the second.
    Or you directly implement two different methods in the bean and call each one directly from the button.
    Timo

  • How to get the table name of a field in a result set

    hi!
    i have a simple sql query as
    select tbl_customerRegistration.*, tbl_customerAddress.address from tbl_customerRegistration, tbl_customerAddress where tbl_customerAddress.customer_id = tbl_customerRegistration.customer_ID
    this query executes well and gets data from the database when i get ResultsetMetaData from my result set (having result of above query) i am able to get the field name as
    ResultSetMetaData rsmd = rs.getMetaData();//rs is result set
    String columnName = rsmd.getColumnName(1);
    here i get columnName = "Customer_id"
    but when i try to get the tabel name from meta data as
    String tableName = rsmd.getTableName(1); i get empty string in table name....
    i want to get the table name of the respective field here as it is very important to my logic.....
    how can i do that.....
    please help me in that regard as it is very urgent
    thanks in advance
    sajjad ahmed paracha
    you may also see the discussion on following link
    http://forum.java.sun.com/thread.jspa?threadID=610200&tstart=0

    So far as I'm aware, you can't get metadata information about the underlying tables in a query from Oracle and/or the Oracle drivers. I suspect, in fact, that the driver would have to have its own SQL parser to get this sort of information.
    I'm curious though-- how do you have application logic that depends on the name of the source table but not know in the application what table is involved? Could you do something "cheesy" like
    SELECT 'tbl_customerRegistration' AS tbl1_name,
           tbl_customerRegistration.*
    ...Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • FavoriteFolder, how to get the content inside this folder

    Hi
    I have to get with the Java api consumer the content inside the favorite folder. How can i get it?
    i write this code:
                   String searchQuery = search://{'guaglanto1'}?SearchKeywords=true&SearchExact=true&SearchCaseSensitive=true;
                   ResponseHolder rh = boBIPlatform.get(searchQuery, null);
                   InfoObjects myFav = rh.getInfoObjects();
                   if (myFav == null || source.getInfoObjectArray().length == 0){
                     result="No terms matching the following search query could be found: " + searchQuery;
                             return result;
                   result ="";          
                   for (InfoObject infoObject: myFav.getInfoObjectArray()){
                     result= result+ infoObject.getName() + " has CUID: " + infoObject.getCUID()+ " type "+ infoObject.getKind() + " has childreen "+ infoObject.getChildrenObjects();
    Where guaglanto1 is the title of the favoriteFolder.This code show the CUID,name,kind and children of the favoriteFolder.  Now i want to navigate this folder and get its content (i see from InfoViewApp there are 5 web intelligent report inside the favorite folder) but i don't know how can i get that.
    Anyone can help me to resolve this problem?
    thank you
    best regard
    Andrea

    once you get the SI_ID or SI_CUID of the favorites folder you need to write an additional query to pull all its children using:
    select * from ci_infoobjects where si_parentcuid='<si_cuid of favorites folder>'
    If the favorites folder contains folders with subfolders, this will be a recursive call. You can use query://{select....} or path://
    Look at the BIPlatform documentation in API reference and there is more information on how to use query:// or path://

  • How to get the table Event action in the controller???

    HI
    Based on my requirement i have extended my controller,but i want to perform some validation like ,,,,
    i have table in one region ,in which one column is having a Button (flex field) action with image,
    i want to write the code in the controller according to the validation ,,,,but i am unable to find the event action in the main controller,
    how to get the event action ?,,,,, of the item type as image
    thanks in advance
    Kash

    If not you can use image component with clientListener and serverListener to preform your requirement set clientListener click event and then inside clientListener java script method call the
    serverListener then will execute serverListener method.

  • How to get ACK ID inside the BPM

    Hi,
    In my BPM Scenario,I want to update the database table as soon as the file is created in the destination system.So in the Send step I used Transport Acknowledgement option but I don't know how to get the ACK Id inside the BPM.Please help me.
    Regards,
    Sharmila

    There will be no Ack ID in the BPM.
    Read thru this blog to understand the file adapters ack better,
    /people/michal.krawczyk2/blog/2006/06/22/xi-playing-with-the-file-adapters-acknowledgments
    Regards
    Bhavesh

Maybe you are looking for

  • A trouble with "LIKE" in a select statement

    Hi! I'm having trouble with "LIKE" in a select statement... With Access I can make the following and everything works well: SELECT name, birthday FROM client WHERE birthday LIKE '*/02/*'; but if try to do it in my application (it uses Access), it doe

  • Safari crashes when trying to access secure site with certificates

    The error message I get is...any ideas? It's consistent across all 10.6.8 computers with the latest updates: Process:         Safari [1680] Path:            /Applications/Safari.app/Contents/MacOS/Safari Identifier:      com.apple.Safari Version:    

  • HP s5503w, Windows 7 ultimate 64 bit. Wanting to plug a card reader into the motherboar​d.

    New to the forums and have looked but can not find an answer to my question. I have the HP s5503w SlimLine desk computer; what I need an answer to is where on the motherboard do I plug in the card reader that I have. Have searched both here and on th

  • Data Services Designer - Problem when inserting rows in a database

    Hi everyone!!! I created a simple job that queries an Oracle database and writes the data returned from the query in a database as mysql. The problem is that only one row is being written in the database, being that the return of my query has more th

  • Error handling when value is null

    hi i have a stuation where i what to display meaningfull error message if the lov is not selected,am navigating to next page based on lov selection,i what to display good message if you try to navigate without making selection public String showSelec