How to convert mongodb data  to oracle

The requirement is I need to convert the mongodb or JSON data which is provided to us in Oracle format
so that it can be used in Oracle Data Integrator ODI
Edited by: 918554 on Aug 9, 2012 10:37 PM
Edited by: 918554 on Aug 9, 2012 11:02 PM
Kindly reply soon its urgent
Edited by: 918554 on Aug 9, 2012 11:03 PM

918554 wrote:
how to convert mongodb data to oracleThis is NOT an Oracle problem or solution.
http://www.mongodb.org/display/DOCS/SQL+to+Mongo+Mapping+Chart

Similar Messages

  • How to convert a data set into a xml data and vice versa

    i am new to oracle with xml..
    my aim is to convert a data set into a xml data and vice versa..
    my work is as follows...
    my query:
    select rggpk,rggcode,rggname from ms_regiongeo
    to convert a data set into a xml*
    select XMLType(trim(replace(dbms_xmlgen.getXML('select rggpk,rggcode, rggname from ms_regiongeo'),'<?xml version="1.0"?>',''))) XML_DATA from dual;
    (this works fine and output of this query is as follows..)
    <ROWSET>
    <ROW>
      <RGGPK>201</RGGPK>
      <RGGCODE>Asia</RGGCODE>
      <RGGNAME>Asia</RGGNAME>
    </ROW>
    <ROW>
      <RGGPK>1</RGGPK>
      <RGGCODE>OTH</RGGCODE>
      <RGGNAME>Others</RGGNAME>
    </ROW>
    <ROW>
      <RGGPK>21</RGGPK>
      <RGGCODE>COB</RGGCODE>
      <RGGNAME>Africa and Yemen</RGGNAME>
    </ROW>
    <ROW>
      <RGGPK>2</RGGPK>
      <RGGCODE>AUS</RGGCODE>
      <RGGNAME>Australia</RGGNAME>
    </ROW>
    <ROW>
      <RGGPK>23</RGGPK>
      <RGGCODE>IND</RGGCODE>
      <RGGNAME>Indian Sub Continent</RGGNAME>
    </ROW>
    <ROW>
      <RGGPK>24</RGGPK>
      <RGGCODE>TVM</RGGCODE>
      <RGGNAME>North America</RGGNAME>
    </ROW>
    </ROWSET>
    and to reverse this process, I tried a query like this..*
    select EXTRACTVALUE (XML_DATA,'ROWSET/ROW/RGGPK') as EMP_ID
    from(
            select XMLType(trim(replace(dbms_xmlgen.getXML('select rggpk,rggcode, rggname from ms_regiongeo'),'<?xml version="1.0"?>',''))) XML_DATA from dual
    )tab1but failed.. and raised with an eror: ORA-19025
    help me..
    regards,
    john

    Hi-
    my aim is to convert a data set into a xml data  You can refer to the below posts
    Adding namespace to XML output
    Re: how to convert table data in xml format based on the xsd.

  • How to import csv data into Oracle using c#

    Hello,
    How to import csv data into Oracle using c #. Where data to be imported 3GB in size and number of rows 7512263. I've managed to import csv data into Oracle, but the time it takes about 1 hour. How to speed up the time it takes to import csv data into oracle. Thank you.
    This is my code:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Diagnostics;
    using System.Threading;
    using System.Text.RegularExpressions;
    using System.IO;
    using FileHelpers;
    using System.Data.OracleClient;
    namespace sqlloader
    class Program
    static void Main(string[] args)
    int jum;
    int i;
    bool isFirstLine = false;
    FileHelperEngine engine = new FileHelperEngine(typeof(XL_XDR));
    //Connect To Database
    string constr = "Data Source=(DESCRIPTION=(ADDRESS_LIST="
    + "(ADDRESS=(PROTOCOL=TCP)(HOST= pt-9a84825594af )(PORT=1521 )))"
    + "(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=o11g)));"
    + "User Id=xl;Password=rahasia;";
    OracleConnection con = new OracleConnection(constr);
    con.Open();
    // To Read Use:
    XL_XDR[] res = engine.ReadFile("DataOut.csv") as XL_XDR[];
    jum = CountLinesInFile("DataOut.csv");
    FileInfo f2 = new FileInfo("DataOut.csv");
    long s2 = f2.Length;
    int jmlRecord = jum - 1;
    for (i = 0; i < jum; i++)
    ShowPercentProgress("Processing...", i, jum);
    Thread.Sleep(100);
    if (isFirstLine == false)
    isFirstLine = true;
    else
    string sql = "INSERT INTO XL_XDR (XDR_ID, XDR_TYPE, SESSION_START_TIME, SESSION_END_TIME, SESSION_LAST_UPDATE_TIME, " +
    "SESSION_FLAG, VERSION, CONNECTION_ROW_COUNT, ERROR_CODE, METHOD, HOST_LEN, HOST, URL_LEN, URL, CONNECTION_START_TIME, " +
    "CONNECTION_LAST_UPDATE_TIME, CONNECTION_FLAG, CONNECTION_ID, TOTAL_EVENT_COUNT, TUNNEL_PAIR_ID, RESPONSIVENESS_TYPE, " +
    "CLIENT_PORT, PAYLOAD_TYPE, VIRTUAL_TYPE, VID_CLIENT, VID_SERVER, CLIENT_ADDR, SERVER_ADDR, CLIENT_TUNNEL_ADDR, " +
    "SERVER_TUNNEL_ADDR, ERROR_CODE_2, IPID, C2S_PKTS, C2S_OCTETS, S2C_PKTS, S2C_OCTETS, NUM_SUCC_TRANS, CONNECT_TIME, " +
    "TOTAL_RESP, TIMEOUTS, RETRIES, RAI, TCP_SYNS, TCP_SYN_ACKS, TCP_SYN_RESETS, TCP_SYN_FINS, EVENT_TYPE, FLAGS, TIME_STAMP, " +
    "EVENT_ID, EVENT_CODE) VALUES (" +
    "'" + res.XDR_ID + "', '" + res[i].XDR_TYPE + "', '" + res[i].SESSION_START_TIME + "', '" + res[i].SESSION_END_TIME + "', " +
    "'" + res[i].SESSION_LAST_UPDATE_TIME + "', '" + res[i].SESSION_FLAG + "', '" + res[i].VERSION + "', '" + res[i].CONNECTION_ROW_COUNT + "', " +
    "'" + res[i].ERROR_CODE + "', '" + res[i].METHOD + "', '" + res[i].HOST_LEN + "', '" + res[i].HOST + "', " +
    "'" + res[i].URL_LEN + "', '" + res[i].URL + "', '" + res[i].CONNECTION_START_TIME + "', '" + res[i].CONNECTION_LAST_UPDATE_TIME + "', " +
    "'" + res[i].CONNECTION_FLAG + "', '" + res[i].CONNECTION_ID + "', '" + res[i].TOTAL_EVENT_COUNT + "', '" + res[i].TUNNEL_PAIR_ID + "', " +
    "'" + res[i].RESPONSIVENESS_TYPE + "', '" + res[i].CLIENT_PORT + "', '" + res[i].PAYLOAD_TYPE + "', '" + res[i].VIRTUAL_TYPE + "', " +
    "'" + res[i].VID_CLIENT + "', '" + res[i].VID_SERVER + "', '" + res[i].CLIENT_ADDR + "', '" + res[i].SERVER_ADDR + "', " +
    "'" + res[i].CLIENT_TUNNEL_ADDR + "', '" + res[i].SERVER_TUNNEL_ADDR + "', '" + res[i].ERROR_CODE_2 + "', '" + res[i].IPID + "', " +
    "'" + res[i].C2S_PKTS + "', '" + res[i].C2S_OCTETS + "', '" + res[i].S2C_PKTS + "', '" + res[i].S2C_OCTETS + "', " +
    "'" + res[i].NUM_SUCC_TRANS + "', '" + res[i].CONNECT_TIME + "', '" + res[i].TOTAL_RESP + "', '" + res[i].TIMEOUTS + "', " +
    "'" + res[i].RETRIES + "', '" + res[i].RAI + "', '" + res[i].TCP_SYNS + "', '" + res[i].TCP_SYN_ACKS + "', " +
    "'" + res[i].TCP_SYN_RESETS + "', '" + res[i].TCP_SYN_FINS + "', '" + res[i].EVENT_TYPE + "', '" + res[i].FLAGS + "', " +
    "'" + res[i].TIME_STAMP + "', '" + res[i].EVENT_ID + "', '" + res[i].EVENT_CODE + "')";
    OracleCommand command = new OracleCommand(sql, con);
    command.ExecuteNonQuery();
    Console.WriteLine("Successfully Inserted");
    Console.WriteLine();
    Console.WriteLine("Number of Row Data: " + jmlRecord.ToString());
    Console.WriteLine();
    Console.WriteLine("The size of {0} is {1} bytes.", f2.Name, f2.Length);
    con.Close();
    static void ShowPercentProgress(string message, int currElementIndex, int totalElementCount)
    if (currElementIndex < 0 || currElementIndex >= totalElementCount)
    throw new InvalidOperationException("currElement out of range");
    int percent = (100 * (currElementIndex + 1)) / totalElementCount;
    Console.Write("\r{0}{1}% complete", message, percent);
    if (currElementIndex == totalElementCount - 1)
    Console.WriteLine(Environment.NewLine);
    static int CountLinesInFile(string f)
    int count = 0;
    using (StreamReader r = new StreamReader(f))
    string line;
    while ((line = r.ReadLine()) != null)
    count++;
    return count;
    [DelimitedRecord(",")]
    public class XL_XDR
    public string XDR_ID;
    public string XDR_TYPE;
    public string SESSION_START_TIME;
    public string SESSION_END_TIME;
    public string SESSION_LAST_UPDATE_TIME;
    public string SESSION_FLAG;
    public string VERSION;
    public string CONNECTION_ROW_COUNT;
    public string ERROR_CODE;
    public string METHOD;
    public string HOST_LEN;
    public string HOST;
    public string URL_LEN;
    public string URL;
    public string CONNECTION_START_TIME;
    public string CONNECTION_LAST_UPDATE_TIME;
    public string CONNECTION_FLAG;
    public string CONNECTION_ID;
    public string TOTAL_EVENT_COUNT;
    public string TUNNEL_PAIR_ID;
    public string RESPONSIVENESS_TYPE;
    public string CLIENT_PORT;
    public string PAYLOAD_TYPE;
    public string VIRTUAL_TYPE;
    public string VID_CLIENT;
    public string VID_SERVER;
    public string CLIENT_ADDR;
    public string SERVER_ADDR;
    public string CLIENT_TUNNEL_ADDR;
    public string SERVER_TUNNEL_ADDR;
    public string ERROR_CODE_2;
    public string IPID;
    public string C2S_PKTS;
    public string C2S_OCTETS;
    public string S2C_PKTS;
    public string S2C_OCTETS;
    public string NUM_SUCC_TRANS;
    public string CONNECT_TIME;
    public string TOTAL_RESP;
    public string TIMEOUTS;
    public string RETRIES;
    public string RAI;
    public string TCP_SYNS;
    public string TCP_SYN_ACKS;
    public string TCP_SYN_RESETS;
    public string TCP_SYN_FINS;
    public string EVENT_TYPE;
    public string FLAGS;
    public string TIME_STAMP;
    public string EVENT_ID;
    public string EVENT_CODE;
    I hope someone can give me a solution. Thanks

    The fastest way is to use external tables or sql loader (sqlldr). (If you use external tables or sql loader, you don't use C# at all).

  • How to convert numeric data to binary decimal in java

    How to convert numeric data to binary decimal in java Pleas egive me code example

    There is no numeric data. It's all binary. If you're talking about Strings, look at the Integer class.

  • How to convert julian Date into Calendar Date

    Hi,
    I want convert julian Date to calendar Date (mm/dd/yyyy or mm/dd/yy format) in java.
    Can any one help me how to convert julian date to calendar Date.
    Thanks,
    Krishore.

    import java.util.*;
    import java.text.*;
    public class jdate {
    Calendar date;
    public jdate(int j)
    date = Calendar.getInstance();
    date.set(Calendar.DAY_OF_YEAR, j);
    public String toString()
    SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy");
    return (formatter.format( date.getTime() ));
    public static void main(String args[])
    if(args.length == 1)
    int j = Integer.parseInt(args[0]);
    jdate julian = new jdate(j);
    System.out.println("Julian date(" + j + ") = " + julian.toString());
    }

  • How to convert a date field with format (dd,mm,yyyy) to format (mm,dd,yyyy)

    Hello.
    How to convert a date field with format (dd,mm,yyyy) to format (mm,dd,yyyy)
    I have text field which has a databind to a date field. When I click on it, we can select the date, it is added on the format (dd,mm,yyyy). When I want to insert this date field to a database It doesnu2019t allow me to do it because it will only accept date field on the format (mm,dd,yyyy)
    I tried to store this format on a date variable and I get a message saying that is impossible to convert a string into a date.
    Regards,
    Jose

    Hi Jose,
    usually you format strings in c# like
    string.Format("{0:yyyyMMdd}", insertyourstring);
    in your case
    string.Format("{0:MM/dd/yyyy}", insertyourstring);
    [look here|http://idunno.org/archive/2004/14/01/122.aspx]
    there are more details
    if everything fails split the string with Mid()
    or ask me
    lg David

  • How to convert system Date into DD-MMM-YYYY Format

    hi friends,
    please help me How to convert system Date into DD-MMM-YYYY Format.
    Regards
    Yogesh

    HI..
    data: w_dt(11) type c,
             w_month(2),
             w_mon(3).
    w_month = p_date+4(2). **p_date = given date**
    case w_month.
    when '01'.
    w_mon = 'Jan'.
    when '02'.
    w_mon = 'Feb'.
    when '03'.
    w_mon = 'Mar'.
    when '04'.
    w_mon = 'Apr'.
    when '05'.
    w_mon = 'May'.
    when '06'.
    w_mon = 'Jun'.
    when '07'.
    w_mon = 'Jul'.
    when '08'.
    w_mon = 'Aug'.
    when '09'.
    w_mon = 'Sep'.
    when '10'.
    w_mon = 'Oct'.
    when '11'.
    w_mon = 'Nov'.
    when '12'.
    w_mon = 'Dec'.
    endcase.
    Now...
      concatenate p_date6(2)  '-'  w_mon  '-'   p_date0(4)  into w_dt.
    write w_dt.

  • How to convert siebel date to following format?

    Hi,
    How to convert siebel date to following format?
    01-01-2011 5:00 AM (dd-mm-yyyy hh:mm AM)
    01-JAN-2011 5:00 AM (dd-MON-yyyy hh:mm AM)
    01/01/2011 5:00 AM (dd/mm/yyyy hh:mm AM)
    Please suggest functions for conversion. Have tried few but didnt work.
    Thanks.

    Excerpts from
    http://bipconsulting.blogspot.com/2010/01/my-date-doesnt-like-me-with-siebel.html
    ".. the date data generated by Siebel with the IO is in ‘MM/DD/YYYY HH:MI:SS’ format, so it is something like ‘10/09/2008 05:31:13’. And BI Publisher doesn’t recognize that this is a date data because it’s not presented in the ‘Canonical’ format!.."
    "...There are two possible and reasonable workarounds to overcome this issue. The first one is to use one of the Siebel’s extended function ‘totext()’ to convert the Siebel date format to the ‘Canonical’ date format before the BI Publisher’s date related function comes in..."
    Please read on the above link to find out how to actually resolve this issue.
    Good Luck
    (please if this provides a solution for you grant the points and close this thread. Thanks!)
    Jorge

  • How to convert CLOB data (now it is in html format) to Normal text format

    Hi,
    Can anybody let me know the solution for how to convert CLOB data into normal Text.In my case the table column having CLOB datatype and the data is in html format.when i run the report the column is displaying html tags .Now i need to convert that html tags into normal text.
    Pl. let me know if any one know the solution.
    Regards,
    Thulasi.K

    LONG has been depricated since 8i so I don't believe there is a general solution to go backwards short of reloading the data.
    Justin

  • How to convert a dedicated running oracle server to a shared server

    i need help as to how to convert a dedicated running oracle server to a shared server.(step by step plz i am fairly a fresh person)
    there are presently 10 users but have to configure for 125 users accessing from 5 locations.
    also need how to implement connection manager

    125 users are not so much, unless your database server is a quite small one. Anyway, you have to configure Dispatchers and Shared Servers. See Configuring Oracle Database for Shared Server
    About Connection Manager see Configuring and Administering Oracle Connection Manager

  • How can i extract data from oracle table  to flat file or excel spread shee

    Hello,
    DB Version is 10.1.0.3.0
    How can i extract data from oracle table to flat file or excel spread sheet by using sub programs?
    Regards,
    D

    Here what I did
    SET NEWPAGE 0
    SET SPACE 0
    SET LINESIZE 80
    SET PAGESIZE 0
    SET ECHO OFF
    SET FEEDBACK OFF
    SET VERIFY OFF
    SET HEADING OFF
    SET MARKUP HTML OFF SPOOL OFF
    Sql> SPOOL bing
    select * from -------;
    SPOOL OFF;
    I do not see file.
    I also tried
    Sql> SPOOL /tmp/bing
    select * from -------;
    SPOOL OFF;
    But still not seeing the fie,

  • How to Transfer the Data from ORACLE APPS to SAP

    Hi Gurus,
    Here are my couple of quieries regarding Data Migration from Legacy(Oracle Apps) to SAP.
    1. How to link between Legacy system(ORACLE APPS) and SAP ?
    2. How to migrate the data from Oracle tables to SAP directly, instead of loading the flat files(.txt, .xls) ?
    Please respond to my queries ASAP.
    Thanks,
    SAPSURE.
    Edited by: sapsure on Sep 9, 2010 11:39 AM
    Edited by: sapsure on Sep 10, 2010 2:32 PM

    1. How to link between Legacy system(ORACLE APPS) and SAP ?
            If you have SAP PI in place then you can interact with oracle database tables directly from PI and then data can be posted to SAP transactions through IDocs/BAPIs.
            If you did not have SAP PI still you can do JDBC connection directly from ABAP program. Not sure about the exact steps check in forum.
    2. How to migrate the data from Oracle tables to SAP directly, instead of loading the flat files(.txt, .xls) ?
            If you want to directly post the data SAP transactions (I hope not directly to SAP tables) then connection needs to establish through ABAP program or Via. PI.
    Regards,

  • How to develope application for converting excel data into oracle database

    I am very new to the oracle world. I want to develop application for converting excel sheet into oracle database using oracle forms. I have basic knowldge of oracle but i am totally new to the forms. Can anybody tel me step by step procedure to do this task? Please help me out in this problem.
    Thanx in advance.

    Hello,
    just do a "Search" in this forum with words "excell to oracle"... and you could find lot of posts about that, i.e.:
    Re: How to load excel-csv file into oracle database
    Jose L

  • How to convert a date value into week value?

    How to display the date value like '20010203'
    into the week number of the year 2001?
    When i type in the following sql
    select week(chg_time) from site;
    I got this error message
    ORA-00904: invalid column name

    use the to_char function, to format the date into a week number (then you might need to convert that to a number using to_number)
    select to_char( sysdate, 'WW') from dual`
    a description of datetime formats: http://download-west.oracle.com/otndoc/oracle9i/901_doc/server.901/a90125/sql_elements4.htm#48515

  • How to convert BLOB data into string format.

    Hi,
    I have problem while converting blob data into string format.
    for example,
    Select dbms_lob.substr(c.shape.Get_wkb(),4000,1) from geotable c
    will get me the first 4000 byte of BLOB .
    When i using SQL as i did above,the max length is 4000, but i can get 32K using plsql as below:
    declare
    my_var CLOB;
    BEGIN
    for x in (Select X from T)
    loop
    my_var:=dbms_lob.substr(x.X,32767,1)
    end loop
    return my_var;
    I comfortably convert 32k BLOB field to string.
    My problem is how to convert blob to varchar having size more than 32K.
    Please help me to resolve this,
    Thanx in advance for the support,
    Nilesh

    Nilesh,
    . . . .The result of get_wkb() will not be human readable (all values are encoded into some binary format).
    SELECT utl_raw.cast_to_varchar2(tbl.geometry.get_wkt()) from FeatureTable tbl;
    -- resulting string:
        ☺AW(⌂özßHAA
    Å\(÷. . . .You may also want to have a look at { dbms_lob | http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_lob.htm#i1015792 } "The DBMS_LOB package provides subprograms to operate on BLOBs, CLOBs, NCLOBs, BFILEs, and temporary LOBs."
    Regards,
    Noel

Maybe you are looking for

  • Quantity of sales order in Milestone wise billing

    Hi i have a sales order and its assigned to Project. Its a project sales order and we are doing milestone billing. only one line item in sales order. Now my question is we dont give quantity in the sales order line item and now the slaes order is sav

  • Highlights text in Preview: it's not viewable in PC apps

    I use to hightlight and underline text using preview.app. If I send the pdf file to other users and if they try to open with a PC they can't see the "things" I made. Any help?

  • Pattern not working in Blending Options!!

    I am trying to complete this tutorial and I am stuck on "Step 9 - Style the metal bars". I have triple checked my work following the given steps, and still can not get the pattern to blend onto the bars! Here's a screen shot showing that I have the g

  • CR 2008 starts with error message

    A customer of mine gets an error when starting CR 2008 (updated over the web with SP1 and SP2)  with the following message: Process entry point not found "?DDV_MinMaxDoubleText@CSLib300@@YAXPAVCDataExchange@@ABNNN@Z" in DLL "cslibu-3-0.dll" He tried

  • OFFLINE_BRBACKUP and SMB_OFFLINE

    hello, what is the different between; PRD_OFFLINE_BRBACKUP and PRD_SMB_OFFLINE both are offline backups. so what are the adv/disadv of getting 2 different kind of offline backups. PRD_OFFLINE_BRBACKUP Getting "ARCHIVELOGS + DATABASE" Command using: