Load faster with MongoDB (JSON) Oracle table data

I use the library http://sourceforge.net/projects/pljson/ analyze the data of MongoDB to Oracle DB, and it works fine. However, I wonder how to use the same library (or any other method available) to send a large volume of data from Oracle DB to the MongoDB. Currently, I use cursor and run to loop to send row-by-row. The method works well with PUT, POST methods. However, it is quite slow (basically, it takes 15 minutes to write 1000 lines/objects in MongoDB).

Here is an example of the code that I currently use:

    OPEN cur_mem_poi_details;
    FETCH cur_mem_poi_details BULK COLLECT INTO V_user_id,
              V_Mps_Member_Id,
              V_Mps_Period,
              V_Mps_Points_Earned,
              V_Mps_Points_Carried,
              V_MPS_TOTAL_POINTS,
              V_MPS_CREDITS_EARNED,
              V_MPS_CREDITS_UTILIZED,
              V_MPS_CREDITS_BALANCE,
              V_MPS_CREDITS_EXPIRY_DATE,
              V_MPS_STMT_PERIOD,
              V_MPS_SALES,                 
              V_MPS_VISI,
              V_MPS_BONUS,
              V_MPS_INTERACTION;
    CLOSE cur_mem_poi_details;
    FOR indx IN 1 .. V_user_id.count
    LOOP
    DBMS_OUTPUT.PUT_LINE(V_user_id(indx));
    UTL_HTTP.SET_WALLET('file:C:/app/', 'manager1');
      content := '{"UserId":"'||V_user_id(indx)||'", "Outlet_Code":"'||V_Mps_Member_Id(indx)||'", "MPD_Month":"'||V_Mps_Period(indx)||'", "MPD_Sales":"'||V_MPS_SALES(indx)||'", "MPD_Visibility":"'||V_MPS_VISI(indx)||'", "MPD_Interact":"'||V_MPS_INTERACTION(indx)||'", "MPD_Bonus":"'||V_MPS_BONUS(indx)||'", "MPD_Points_Carried_Forward":"0", "MPD_Points_Month":"'||V_Mps_Points_Earned(indx)||'"}}}';
      dbms_output.put_line(content);
      req     := utl_http.begin_request(url, 'POST',' HTTP/1.1');
UTL_HTTP.set_header(req, 'X-Appery-Database-Id', '53f2dac5e4b02cca64021dbe');
utl_http.set_header(req, 'content-type', 'application/json'); 
utl_http.set_header(req, 'Content-Length', length(content));

utl_http.write_text(req, content);

res := utl_http.get_response(req);

    begin
    loop
    utl_http.read_line(res, buffer);
    dbms_output.put_line(buffer);

    end loop;
    utl_http.end_response(res);
    exception
    when utl_http.end_of_body then
    utl_http.end_response(res);
    end;

      v_rowcnt := INDX;
    END LOOP;

As you can see, a line is sent by request. So, I think if one wants to in any way in Oracle 11 g build JSON file and send it all together in a single application or at least on several segments.

I found this article useful http://ora-00001.blogspot.sk/2010/02/ref-cursor-to-json.html , but I did not understand how to take advantage of the DBMS_SQL and not have to go through xml before you convert it to JSON.

It really depends on the interface to MongoDB.

If this interface can manage a JSON array, with multiple lines, you can use it.

And if this interface can manage segmented transfer coding you do not add your lines to a clob first, but write all ranks to the interface as soon as get you.

Tags: Database

Similar Questions

  • Need help for query flat_file type clobdata oracle table data.

    Hi Sir,

    I need help to query oracle table flat file data having given clob type.
    Oracle Version:
    
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    "CORE     10.2.0.1.0     Production"
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    
    
    
    Source table
    
      CREATE TABLE order_details 
       (     QUEUE_SEQNUM NUMBER(10,0) NOT NULL ENABLE, 
         LINE_SEQNUM NUMBER(10,0) NOT NULL ENABLE, 
         CHAR_DATA CLOB, 
         OPTIMISTIC_LOCK_KEY NUMBER(20,0)
       ) 
    COLUMN FOR CHAR_DATA FLAT_FILE
    EU,6067AT,AT10,000000402004,NexiumGERDManagementProject,Z435,,ZZ29,NIS-GOLD,AT
    EU,6067AT,AT10,000000402038,NIS-OEU-ARI-2007/1,Z450,,ZZ29,NIS-OEU-ARI-2007/1,AT
    EU,6067AT,AT10,000000402039,SymbicortNISinCOPD,Z450,,ZZ29,NIS-REU-DUM-2007/1,AT
    EU,6067AT,AT10,000000402040,D1443L00044SeroquelXRRuby,Z450,,ZZ29,D1443L00044,AT
    EU,6067AT,AT10,000000402041,NIS-GEU-DUM-2008/1,Z450,,ZZ29,NIS-GEU-DUM-2008/1,AT
    EU,6067AT,AT10,000000402042,SonstigeAktivitätenLCM,Z450,,ZZ29,.,AT
    EU,6067AT,AT10,000000402134,D1680L00002Saxagliptin,Z450,,ZZ29,D1680L00002,AT
    EU,6067AT,AT10,000000402199,SeroquelWaveNIS,Z450,,ZZ29,NIS-NEU-DUM-2009/1,AT
    EU,6067AT,AT10,000000402313,SeroquelExtra(D1443L00082),Z450,,ZZ29,D1443L00082,AT
    EU,6067AT,AT10,000000402517,AtlanticD5130L00006(AZD6140),Z450,,ZZ29,D5130L00006,AT
    EU,6067AT,AT10,000000554494,ArimidexSt.Gallen(13+2),Z142,,ZZ09,,AT
    EU,6067AT,AT10,000000554495,ArimidexASCO(5delegates),Z142,,ZZ09,,AT
    EU,6067AT,AT10,000000554496,ArimidexSanAntonio6delegates,Z142,,ZZ09,,AT
    EU,6067AT,AT10,000000554497,ArimidexBreastCancerSummit(13+2),Z130,,ZZ09,,AT
    EU,6067AT,AT10,000000554498,ArimidexEIH(15delegates),Z130,,ZZ09,,AT
    EU,6067AT,AT10,000000554499,ArimidexNIFA(200delegates),Z135,,ZZ09,,AT
    EU,6067AT,AT10,000000554500,ArimidexNIFAworkshops(8x25),Z135,,ZZ09,,AT
    EU,6067AT,AT10,000000554501,ArimidexPraktischeGyn.Fortbildung,Z147,,ZZ09,,AT
    EU,6067AT,AT10,000000554502,ArimidexAGO,Z147,,ZZ09,,AT
    EU,6067AT,AT10,000000554503,ArimidexHämato/OnkologieKongress,Z147,,ZZ09,,AT
    EU,6067AT,AT10,000000554504,ARIMIDEXGYNäKOLOGENKONGRESS,Z147,,ZZ09,,AT
    EU,6067AT,AT10,000000554505,ArimidexChirurgenkongress,Z147,,ZZ09,,AT
    EXPECTED RESULTS:
    AFFIRM_CODE COMPANY_CODE INTERNAL_ORDER_CODE INTERNAL_ORDER_DESC ENIGMA_ACTIVITY             SUB_ACTIVITY_CODE IN_AFF_IND ORDER_TYPE EXTERNAL_ORDER COUNTRY        
    EU          6067AT       AT10                 000000402004       NEXIUMGERDMANAGEMENTPROJECT     Z435           NULL        ZZ29       NIS-GOLD        AT             
    EU          6068AT       AT11                 000000402005       NEXIUMGERDMANAGEMENTPROJECT     Z435           NULL        ZZ29       NIS-GOLD        AT             

    Sorry, my bad. Without database at hand, I'll try 'baby steps' (borrowed from Frank) so you don't confuse it with errors that I might add (happens far too often already, but at least you won't "swallow" as forum members think is one of the main goals of this fighter - help her learn - providing not only the proverbial fish.)
    Search the Forum - your problem is one of its best sellers. Watching {message identifier: = 10694602} ("split string into" was the key word used in research) you can try something as

    select table_row,
           level clob_row,
           regexp_substr(char_data,'[^' || chr(13) || chr(10) || ']+',1,level) the_line
      from (select to_char(queue_seqnum)||':'||to_char(line_seqnum) table_row,
                   char_data
              from order_details
           )
     connect by regexp_substr(char_data,'[^' || chr(13) || chr(10) || ']+',1,level) is not null
            and prior char_data = char_data
            and prior table_row = table_row
            and prior sys_guid() is not null
    

    to get all the s the_lineall CLOB and after that the use of the example even to get your columns of each the_line.

    Concerning

    Etbin

    Edited by: Etbin on 3.2.2013 09:01

    .. .but I m connected to do things according to the instructions, I can't do something.

    Used to happen to me too and I did as told to the but only after explaining any disadvantages, I was aware of in time. The last sentence is usually: "O.K. now be just and Don't come back with that kind of thing when it turns out that this isn't the right thing."
    rp0428 post - something to remember.

  • How to load the demilited hose to Oracle table text file

    Hi all

    I have a file (filaname.txt) I want to load into oracle table.

    This file is pipe delimited.

    Some examples of filename.txt data...

    SOURCE_SYSTEM_NAME | ACCOUNT_NUMBER | BILL_TO_LOCATION | SHIP_TO_LOCATION
    SMS US | 0001 | 1. 1
    SMS US | 0001 | 1. 2
    SMS US | 0001 | 1. 4
    SMS US | 0002 | 1. 1

    could you please suggest what are the parametrs to create a data store for a pipe delimited txt file.

    Thank you

    When you create him data store for the file in the files tab to define the field as separator. or Hex 7 c

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • Is it possible to record the interview in cloud Service Oracle table data before submitting

    Hello

    We use customer portal application and would like to save data in Oracle Service cloud tables between interview, before submitting.

    Y at - it an option to save the data?

    the cloud of 12.2 current supports, pre loading data and submitted data. Please help on this.

    Thank you

    Vivek

    Thanks for the inputs.

    We strive to implement save button and button Save & continue on each page, because we have many issues to be resolved.

    In our scenario, a folder must be created for all the session data.

    Thank you
    Vivek

  • XML from the Oracle Table data

    Hi all

    I'm new to this network. I'm also new to oracle XML package. I want a help with the query below.

    CREATE TABLE EMP (ID NUMBER PRIMARY KEY, NAME VARCHAR2 (10), TELEPHONE NUMBER);

    INSERT INTO EMP (ID, NAME, PHONE) VALUES (11, 'Joy', 1234);
    INSERT INTO EMP (ID, NAME, PHONE) VALUES (22, 'Mike', 5678).
    INSERT INTO EMP (ID, NAME, PHONE) VALUES (33, "Jason", NULL);
    COMMIT;

    I want to export data from the EMP table in an XML file with the format below.

    Power required:

    <? XML version = "1.0" encoding = "UTF-8"? > < Joy STATICDATA > < EMP > < ID > 11 < /ID > < NAME > < / NAME > < / EMP > < / STATICDATA >
    <? XML version = "1.0" encoding = "UTF-8"? > < Mike STATICDATA > < EMP > < ID > 22 < /ID > < NAME > < / NAME > < / EMP > < / STATICDATA >
    <? XML version = "1.0" encoding = "UTF-8"? > < Jason STATICDATA > < EMP > < ID > 33 < /ID > < NAME > < / NAME > < / EMP > < / STATICDATA >

    I used some XML functions and you wrote the following query.

    Select XMLROOT (XMLELEMENT (staticdata, XMLELEMENT (EMP, XMLELEMENT(ID,ID), XMLELEMENT(NAME,NAME))), version "1.0" encoding = "UTF - 8') xml EMP;

    my query output:

    <? XML version = "1.0" encoding = "UTF-8"? >
    < STATICDATA >
    < EMP >
    < ID > 11 / < ID >
    Joy of < NAME > < / NAME >
    < / EMP >
    < / STATICDATA >
    <? XML version = "1.0" encoding = "UTF-8"? >
    < STATICDATA >
    < EMP >
    < ID > 22 / < ID >
    < NAME > Mike < / NAME >
    < / EMP >
    < / STATICDATA >
    <? XML version = "1.0" encoding = "UTF-8"? >
    < STATICDATA >
    < EMP >
    < ID > 33 / < ID >
    Jason < NAME > < / NAME >
    < / EMP >
    < / STATICDATA >


    But I want the out as the power required above. all records in a single line. can someone help me achieve the desired output. also can I export all columns of the table with something like select * from the table in the XML file?

    Thank you
    Delobelle

    Don't know why you need it on a single line, but you could:

    Select XMLTYPE (REGEXP_REPLACE (XMLROOT (XMLELEMENT (staticdata, XMLELEMENT (EMP, XMLELEMENT(ID,ID), XMLELEMENT(NAME,NAME))), version "1.0" encoding = "UTF - 8'), CHR (10) |)) ' *<><'))>
    FROM EMP;

    SY.

  • Create the view with the CLOB of TABLE data type with the LONG data type

    Please need support to create the table view
    Source table: (itemid varchar2, longrec)
    need to create the table view Source
    (itemid varchar2, CLOBrec)

    A BUSINESS object must have a storage in the database, so you can't have a CLOB column in a view by pointing to a not lob data column.

    Max
    [My Italian blog Oracle | http://oracleitalia.wordpress.com/2010/01/17/supporto-di-xml-schema-in-oracle-xmldb/]

  • XML document to the oracle tables - data isn't fatching

    Hello
    I'm new to xml and trying to extract some fields of XML to oracle to use more in the application tables. I wrote the following to extract the values, but nothing is fatching document:



    <? XML version = "1.0" encoding = "UTF-8"? >
    -dmsgo:DMS_GO_Interface xmlns:dmsgo = "https://globalordering.daimler.com/start/dms/interface/DMS_GO_Interface/v1" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi: schemaLocation = "https://globalordering.daimler.com/start/dms/interface/DMS_GO_Interface/v1 DMS_GO_Interface_v1.xsd" >
    < dmsgo:majorversion > 1 < / dmsgo:majorversion >
    < dmsgo:identity context = datetimecreated "CONFGOFR_OUT" = "03/01/2011 10:51 ' source = 'go' sourceversion ="1.410.1"/ >"
    -< dmsgo:prospect >
    < code dmsgo:requestresponse = "0" / >
    < dmsgo:references / >
    -dmsgo:configurationcontext dataversion = LangueCode "2163" = "" orderingmarket = '867' saleslevel "O" = >
    < dmsgo:configurationdate > 03/01/2011 < / dmsgo:configurationdate >
    < / dmsgo:configurationcontext >
    -< dmsgo:vehicle >
    < dmsgo: variant baumuster = "2120482" manufacturercode = "2120482" / >
    < dmsgo:desc > E 200 CGI BlueEFFICIENCY sedan RHD < / dmsgo:desc >
    -< dmsgo:colorcombination >
    < dmsgo:interiorcolor codeowner = 'C' manufacturercode = "4201" = ppmtype "to THE" > black leather < / dmsgo:interiorcolor >
    < dmsgo:exteriorcolor = 'C' manufacturercode codeowner = "2497" ppmtype "READ" = > metal Brown corrosion < / dmsgo:exteriorcolor >
    < dmsgo:paintzone manufacturercode = "" preference = "2" / > "
    < / dmsgo:colorcombination >


    INSERT INTO p1 (flux_name, elment_1, elment_2, elment_3)
    SELECT flux_name, elment_1, elment_2, elment_3
    FROM XMLTable)
    XMLNamespaces ('https://globalordering.daimler.com/start/dms/interface/DMS_GO_Interface/v1' as 'dmsgo'),
    "dmsgo:DMS_GO_Interface/perspective/vehicle.
    passage xmltype (bfilename('DMLDIR','prospect.xml'), nls_charset_id ('CHAR_CS'))
    columns
    path of varchar2 (20) flux_name "dmsgo:variant/@baumuster"
    path of varchar2 (20) elment_1 "dmsgo:desc"
    path of varchar2 (20) elment_2 ' dmsgo:colorcombination / interiorcolor',
    path of varchar2 (20) elment_3 'dmsgo:colorcombination/interiorcolor/@manufacturercode '.
    );

    Help, please.

    Looking forward to early response.

    Thank you
    Usman

    Hello

    'Re missing you the prefix to namespace on elements.
    This should work:

    SQL> SELECT flux_name, elment_1, elment_2, elment_3
      2  FROM XMLTable(
      3    XMLNamespaces ('https://globalordering.daimler.com/start/dms/interface/DMS_GO_Interface/v1' as "dmsgo"),
      4    'dmsgo:DMS_GO_Interface/dmsgo:prospect/dmsgo:vehicle'
      5    passing xmltype(bfilename('DMLDIR','prospect.xml'), nls_charset_id('CHAR_CS'))
      6    columns
      7      flux_name varchar2(20) path 'dmsgo:variant/@baumuster',
      8      elment_1  varchar2(40) path 'dmsgo:desc',
      9      elment_2  varchar2(20) path 'dmsgo:colorcombination/dmsgo:interiorcolor',
     10      elment_3  varchar2(20) path 'dmsgo:colorcombination/dmsgo:interiorcolor/@manufacturercode'
     11  );
    
    FLUX_NAME            ELMENT_1                                 ELMENT_2             ELMENT_3
    -------------------- ---------------------------------------- -------------------- --------------------
    2120482              E 200 CGI BlueEFFICIENCY Sedan RHD       Leather black        4201
     
    
  • Load since excellent data to Oracle Tables

    Hi all

    I want to create a table with the payment year as default sysdate (to_char(sysdate,'yyyy')) and months in the form 'MM' (as default payment_month < (syadate, 'MM') >

    I'm doing it in vain. Help me please, and the other is want to load data from EXCEL to ORACLE table.

    I used to load the load data using SQL * LOADER. can you please let me know is possible to load data without using SQL * Loader? Please give me the solution for this.

    Thank you
    ORA.
  • Load xml data into an Oracle table

    Hello

    I went through some threads in the forums itself, but for my requirement that nothing comes closer, I write my request. I have a XML like this
    <? XML version = "1.0"? >
    < ACCOUNT_HEADER_ACK >
    < HEADER >
    < STATUS_CODE > 100 < / STATUS_CODE >
    Check < STATUS_REMARKS > < / STATUS_REMARKS >
    < / Header >
    < DETAILS >
    < DETAIL >
    < SEGMENT_NUMBER > 2 < / SEGMENT_NUMBER >
    PR Polytechnic < REMARKS > < / COMMENTS >
    < / DETAILS >
    < DETAIL >
    < SEGMENT_NUMBER > 3 < / SEGMENT_NUMBER >
    < REMARKS > PR Polytechnic administration < / COMMENTS >
    < / DETAILS >
    < DETAIL >
    < SEGMENT_NUMBER > 4 < / SEGMENT_NUMBER >
    < REMARKS > rp Polytechnique finance < / COMMENTS >
    < / DETAILS >
    < DETAIL >
    < SEGMENT_NUMBER > 5 < / SEGMENT_NUMBER >
    < REMARKS > logistics Polytechnique rp < / COMMENTS >
    < / DETAILS >
    < / DETAILS >
    < HEADER >
    < STATUS_CODE > 500 < / STATUS_CODE >
    < STATUS_REMARKS > process exception < / STATUS_REMARKS >
    < / Header >
    < DETAILS >
    < DETAIL >
    < SEGMENT_NUMBER > 20 < / SEGMENT_NUMBER >
    Basic Polytechnique < REMARKS > < / COMMENTS >
    < / DETAILS >
    < DETAIL >
    < SEGMENT_NUMBER > 30 < / SEGMENT_NUMBER >
    < / DETAILS >
    < DETAIL >
    < SEGMENT_NUMBER > 40 < / SEGMENT_NUMBER >
    Finance basic Polytechnique < REMARKS > < / COMMENTS >
    < / DETAILS >
    < DETAIL >
    < SEGMENT_NUMBER > 50 < / SEGMENT_NUMBER >
    Logistics base Polytechnique < REMARKS > < / COMMENTS >
    < / DETAILS >
    < / DETAILS >
    < / ACCOUNT_HEADER_ACK >

    Here is the xml structure of the master structure and child I want to insert data in Oracle tables using the sql * loader initially tried to create a control file, but I don't know how to terminate in the control file, so I created two control files

    load data
    INFILE 'acct.xml' ' str ' < / DETAIL >»»
    TRUNCATE
    in the xxrp_acct_detail table
    TRAILING NULLCOLS
    (
    dummy fill finished by "< DETAIL >."
    SEGMENT_NUMBER surrounded by '< SEGMENT_NUMBER >' and ' < / SEGMENT_NUMBER >, "
    REMARKS framed by 'Of REMARKS <>' and ' < / COMMENTS >.
    )


    load data
    ACCT.XML INFILE' "str" < / header > ' "»
    TRUNCATE
    in the xxrp_acct_header table
    fields terminated by '< HEADER >.
    TRAILING NULLCOLS
    (
    dummy fill finished by "< HEADER >."
    STATUS_CODE framed by '< STATUS_CODE >' and ' < / STATUS_CODE >. "
    STATUS_REMARKS surrounded by '< STATUS_REMARKS >' and ' < / STATUS_REMARKS >.
    )

    I refer to the same xml file in two control files, where with regard to the first control file, I was able to load the files but the second which I suppose as table header not able to load the records of rest. I get the below error.

    Sheet 2: Rejected - error on the XXRP_ACCT_HEADER, column DUMMY table.
    Field in the data file exceeds the maximum length
    Sheet 3: Rejected - error on the XXRP_ACCT_HEADER, column DUMMY table.
    Field in the data file exceeds the maximum length

    In fact if its possible to seggrate a control file so it will be very useful for me. I'm also open for the external table as option. Please help me in this regard.

    Thanks in advance.

    Concerning
    Mr. Nagendra

    Here are two possible solutions:

    (1) reading the headers and separate details using two XMLTables:

    DECLARE
    
     acct_doc xmltype := xmltype( bfilename('TEST_DIR','acct.xml'), nls_charset_id('AL32UTF8') );
    
    BEGIN
    
     insert into xxrp_acct_details (status_code, status_remarks, segment_number, remarks)
     select x1.status_code,
            x1.status_remarks,
            x2.segment_number,
            x2.remarks
     from xmltable(
      '/ACCOUNT_HEADER_ACK/HEADER'
      passing acct_doc
      columns header_no      for ordinality,
              status_code    number        path 'STATUS_CODE',
              status_remarks varchar2(100) path 'STATUS_REMARKS'
     ) x1,
     xmltable(
      '$d/ACCOUNT_HEADER_ACK/DETAILS[$hn]/DETAIL'
      passing acct_doc as "d",
              x1.header_no as "hn"
      columns segment_number number        path 'SEGMENT_NUMBER',
              remarks        varchar2(100) path 'REMARKS'
     ) x2
     ;
    
    END;
    

    All first (alias X 1) retrieves all headers in separate lines. The HEADER_NO generated column is used to keep track of the position of the header into the document.
    Then, we join a second XMLTable (X 2), passing HEADER_NO, so that we can access the corresponding items in DETAIL.

    (2) reading with one XMLTable, but somewhat more complex XQuery:

    DECLARE
    
     acct_doc xmltype := xmltype( bfilename('TEST_DIR','acct.xml'), nls_charset_id('AL32UTF8') );
    
    BEGIN
    
     insert into xxrp_acct_details (status_code, status_remarks, segment_number, remarks)
     select x.*
     from xmltable(
      'for $i in /ACCOUNT_HEADER_ACK/HEADER
       return
        for $j in $i/following-sibling::DETAILS[1]/DETAIL
        return element r {$i, $j}'
      passing acct_doc
      columns status_code    number        path 'HEADER/STATUS_CODE',
              status_remarks varchar2(100) path 'HEADER/STATUS_REMARKS',
              segment_number number        path 'DETAIL/SEGMENT_NUMBER',
              remarks        varchar2(100) path 'DETAIL/REMARKS'
     ) x
     ;
    
    END;
    

    Here, we use an XQuery query to extract the information that we need.
    Basically it's the same logic as above, but with two nested loops which access each header, then each RETAIL location immediately after in the order of the documents.

    Here is the link to the documentation XMLTable and XQuery in Oracle:
    http://download.Oracle.com/docs/CD/B28359_01/AppDev.111/b28369/xdb_xquery.htm#CBAGCBGJ

  • Need help to load the data from the Excel data to oracle tables

    I need to load an Excel worksheet to the Oracle table.

    The worksheet contains 20 columns, the first 8 columns contains basic information, but the rest 12 columns contains info like
    1stQtr_08, 2ndQtr_08, 3rdQtr_08, 4thQtr_08
    1stQtr_09, 2ndQtr_09, 3rdQtr_09, 4thQtr_09
    1stQtr_10, 2ndQtr_10, 3rdQtr_10, 4thQtr_10

    So what I have to do is:

    break only one record (with 20 fields) in Excel to 3 files for each fiscal year in the Oracle table for each record in the database table will look like

    8 base field + fiscal_year + 1stQtr_08, 2ndQtr_08, 3rdQtr_08, 4thQtr_08
    8 base field + fiscal_year + 1stQtr_09, 2ndQtr_09, 3rdQtr_09, 4thQtr_09
    8 base field + fiscal_year + 1stQtr_10, 2ndQtr_10, 3rdQtr_10, 4thQtr_10

    There are about 10000 rows in the data file, so how can I use sqlldr to perform this task? beside sqlldr, other good suggestions?

    THX

    External tables is just an API Oracle sqlloader. If you are about to load this data over and over again, the external tables would be a good idea, but if it's a one time thing, sqlldir is more simple, unless you want to just learn to use external Tables.

    I used to run a data warehouse, so I did it, the less similar to what you do in the past.

  • Load table data into Oracle Essbase

    Hi all

    I have a problem

    1 oracle table have 50 million records

    Essbase load data from that

    ODI error message:

    Caused by: java.sql.BatchUpdateException: means: Java heap space

    at org.hsqldb.jdbc.JDBCPreparedStatement.executeBatch (unknown Source)

    at oracle.odi.runtime.agent.execution.sql.BatchSQLCommand.execute(BatchSQLCommand.java:44)

    at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:102)

    at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:1)

    at oracle.odi.runtime.agent.execution.DataMovementTaskExecutionHandler.handleTask(DataMovementTaskExecutionHandler.java:87)

    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)

    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)

    at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:577)

    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:468)

    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2128)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ 2.doAction(StartSessRequestProcessor.java:366)

    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)

    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$ 0 (StartSessRequestProcessor.java:292)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ StartSessTask.doExecute (StartSessRequestProcessor.java:855)

    at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)

    to oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$ 2.run(DefaultAgentTaskExecutor.java:82)

    at java.lang.Thread.run(Thread.java:662)

    I think that Agent Load data so great, if memory cannot load.

    How to fix?

    Please give me a solution.

    Thank you

    As Craig said, move the staging area out the SUNOPSIS MEMORY ENGINE initially. This should only be considered if you are mobile / transform small amounts of data (including 50 million lines isn't :-)).) Why you do not set the staging on your Source Oracle DB in this way, you remove an unnecessary data movement i.e. the LKM and don't rely on memory in engine.

  • Load huge data in oracle table

    Hello

    I am using oracle 11g Express Edition, I have formed a .csv file, which includes a 500MB size data that must be downloaded into the oracle table.

    Please suggest which would be the best method to load data into the table. Data are historical employee ticket, i.e. huge data.

    How to make download of mass data in the suggestion of experts need oracle table on this requirement.

    Thank you
    Sudhir

    best way SQL LOADER

  • Problem with the date when you load the XML file into Oracle Database 10g

    Hi all

    I have the interface as shown in the screenshot below. In this document, among other things, I am mapping to an element XML file representing a date to an Oracle table column defined as DATE. The source and target columns are highlighted in the screenshot.

    ! http://img223.imageshack.us/img223/1565/odiscr275.jpg!

    When I run the interface, I get the following error message:

    java.lang.IllegalArgumentException to java.sql.Date.valueOf(Date.java:103)

    I guess that this is the conversion of the date!

    I already tried to replace SRC_TRADES. DEAL_DATE with TO_DATE (SRC_TRADES. DEAL_DATE, ' DD/MM/YYYY') on the implementation tab. This feature was not recognized when I executed the interface, so it did not work! The value of date in the XML file is in the format DD/MM/YYYY .

    I guess that Date SQL Oracle functions do not work in the implementation tab. Could someone let me know:

    1. what the Date Conversion function I could use instead?
    2. where can I find a reference to the methods/functions that I use in the implementation tab (if such a reference exists)?

    See you soon.

    James

    Hello.

    Try changing the area of execution at the staging area. Once you change it, write in the map box just SRC_TRADERS. DEAL_DATE. When you use TO_DATE, the source field typu should be varchar2, no date (as it is in store for your data source)

  • problem loading data from oracle table excel table / oracle

    Hi all

    I'm working on the form of data transformation 2 different sources to a target table only oracle.
    My first source - excel sheet.
    2nd source - oracle table.

    Creation of data servers, dsn(for excel), reversing everything done very well.
    When I try to display the data there is a problem.

    EXCEL - serial number column is displayed as 1.0,2.0,.3.0 etc. need 1,2,3,4,5...
    Oracle tables-> after that reverse it does not display the data types for the selected columns.

    I am not able to create a join and run.
    Help, please.

    Thank you
    Chaitanya.

    Hello

    Just a thought, why not u cast TO_NUMBER to the interface mapping for the serial number column?

    Thank you
    Guru

  • Load the XML file into Oracle external Table


    I load the data from the XML file into an intermediate table Oracle using external Tables.

    Let's say below, it is my XML file

    < header >
    < A_CNT > 10 < / A_CNT >
    < E_CNT > 10 < / E_CNT >
    < AF_CNT > 10 < / AF_CNT >
    < / header >
    < student >
    <>students-details
    < Student_info >
    < Single_Info >
    < ID > 18 / < ID >
    New York < City > < / City >
    < country > United States < / country >
    < Name_lst >
    < Student_name >
    Samuel < name > < / name >
    Paul < Last_name > < / Last_name >
    < DOB > 19871208 < / DOB >
    Aware of < RecordStatus > < / RecordStatus >
    < / Student_name >
    < Student_name >
    Samuel < name > < / name >
    Paul < Last_name > < / Last_name >
    < DOB > 19871208 < / DOB >

    < TerminationDt > 20050812 < / TerminationDt >
    History of < RecordStatus > < / RecordStatus >
    < / Student_name >
    < / Name_lst >
    < Personal_Info >
    <>men < / Type >
    < 27 > < / Age >
    < / Personal_Info >
    < / Single_Info >
    < / Student_info >

    < student - register >
    class < A >
    < info >
    < detail >
    < ID student > 18 < / student >
    EE < major > < / Major >
    < course-Grades >
    < course > VLSI < / course >
    < degree > 3.0 < / Grade >
    < / course-Grades >
    < course-Grades >
    < course > nanotechnology < / course >
    < degree > 4.0 < / Grade >
    < / course-Grades >
    < / details >
    < detail >
    < ID student > 18 < / student >
    THIS < major > < / Major >
    < / details >
    < / info >
    class < A >
    < Student_Enrol >
    <>students-details
    < student >

    I load this XML data file into a single table using an external Table. Could someone help me please with coding.

    Thank you

    Reva

    Could you please help me how to insert my XML content into that.

    Same as before, try a plain old INSERT:

    insert into xml_pecos

    values)

    XmlType (bfilename ('XML_DIR', "test.xml"), nls_charset_id ('AL32UTF8'))

    );

    But you'll probably hit the same limitation as with the binary XMLType table.

    In this case, you can use FTP to load the file as a resource in the XML DB repository.

    If the XML schema has been registered with the hierarchy enabled then the file will be automatically inserted into the table.

    Could you post the exact statement that you used to save the scheme?

    In the meantime, you can also read this article, I did a few years ago, it covers the XML DB features that may be useful here, including details on how to load the file via FTP:

    https://odieweblog.WordPress.com/2011/11/23/Oracle-XML-DB-a-practical-example/

    And documentation of the course: http://docs.oracle.com/cd/E11882_01/appdev.112/e23094/xdb06stt.htm#ADXDB4672

Maybe you are looking for

  • Why Firefox blocks Lastpass? (IE does not work)

    LastPass is correctly installed and running when it is called from a shortcut icon. However I can not install the add-on in FF FF gives me a note that this will work better if I install the add-on. When I try, I gives me the note that Firefox crashes

  • Factory installed Windows XP OS on a Dell laptop and have a hard disk crash. How can I reinstall windows when there is no CD?

    Factory installed Windows XP OS on a Dell laptop and have a hard disk crash.  How can I reinstall windows when there is no CD?

  • 6520 printers questions

    I installed a printer Photosmart HP 6520 on a computer without a wireless connection.  It is connected with a USB cable. I want to use the 'scan to email' function on the printer, but it won't let me not use it if I'm not hung up wireless.  I can 'sc

  • How to allow for injection of keyboard? (7290)

    I use a 7290 with Software v4.1 and develop on JDE v4.1.  I'm trying to end a call when the user is prompted, and it seems to work fine on the Simulator.  However, the unit I cannot set permission for the injection of keyboard even after wiping/reloa

  • Bit locker

    I have a problem with Bit Locker in Windows 7.  I activated the Bit Locker to a reader on my laptop. After that I decided to remove and install windows again, but I forgot Disable Bit Locker. I formatted the C drive and the installer of windows on it