Extract data from Oracle Database and store it into a CSV file format

Hello.
I'm trying to export a table from an Oracle Database into CSV file format with any Oracle adaptor and store it into a HDFS system.
How could I do it?
Thanks in advance!

Xavi wrote:
HI Charles. Could I use.. Oracle Data Integrator Application Adapter for Hadoop? For this purpose?
Thanks in advancePerhaps. I have to confess that I am not familiar enough with ODI to know if that is within its capabilities.
You might see if there is a forum for ODI and post your question to that.
Charles Lamb

Similar Messages

  • How to extract data from oracle database directly in to bi7.0 (net weaver)

    how to extract data from oracle database directly in to bi7.0 (net weaver)? is it something do with EDI? can anybody explain me in detail?
    Thanks
    York

    You can use UDConnect to get from Oracle database in to BW
    <b>Data Transfer with UD Connect -</b>
    http://help.sap.com/saphelp_nw04/helpdata/en/78/ef1441a509064abee6ffd6f38278fd/content.htm
    <b>Prerequisites</b>
    You have installed the SAP WAS J2EE Engine with BI Java components.  You can find more information on this in the SAP BW installation guide on the SAP Service Marketplace at service.sap.com/instguides.
    Hope it Helps
    Chetan
    @CP..

  • Extracting data from Oracle GL and importing to FDM using ERPI adapter

    Hi,
    I am also trying to use ERPI adapter to directly extract data from Oracle GL. I am not finding sufficient information on this. It would be great if anyone can help me in this.
    I have one more doubt: Can we call the stored procedures in the FDM custom scripts, If so can I get the syntax of the script...I really don't have idea on this FDM part. I was working till now with the Flatfile input, But my client wants to make this change in the existing system. Accessing/Extracting data from Oracle GL. Experts who knows it can pls guide me.
    I am using FDM 11.1.2 and ERPI associated with 11.1.2.
    Thanks in Advance.
    [email protected]

    Hi,
    Is it possible to execute the stored procedures in FDM. Currently we are extracting data from oracle GL using SQl procedures (constaller tool is user to create the inteface) and storing the required data in the intermediate table in oracle GL, From which we are extracting data into a flat file and then loading it to FDM.
    So my question: is it possible to invoke the stored procedure from FDM scripts, If so can you pls let me know how to do that...
    Thanks In Advance,
    [email protected]

  • Retrieving data from oracle database and displaying using servlets

    //DataRetrieving.class file
    import java.io.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class DataRetrieving extends HttpServlet{
    public void doGet(HttpServletRequest request, HttpServletResponse response)throws
    ServletException, IOException{ 
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    out.println("A program for connecting oracle database");
    try
    Class.forName("oracle.jdbc.driver.OracleDriver");
    Connection con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:ORCL", "scott","tiger");
    Statement stmt = con.createStatement();
    ResultSet r = stmt.executeQuery ("SELECT ename,job,sal,comm,deptno FROM emp");
    while ( r.next() )
         String bar = r.getString("ename");
         String bar1 = r.getString("job");
         float bar2 = r.getInt("sal");
         float bar3 = r.getInt("comm");
         int bar4 = r.getInt("deptno");
         //out.println(r.getString(0)+" "+r.getString("ename"));
         out.println("hi");
         out.println(bar1);
    r.close();
    stmt.close();
    con.close();
    catch (Exception e)
    out.println("ERROR : " + e);
    //web.xml file
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!--<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd"> -->
    <web-app>
    <servlet>
    <servlet-name>Hello</servlet-name>
    <servlet-class>DataRetrieving</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>Hello</servlet-name>
    <url-pattern>/DataRetrieval</url-pattern>
    </servlet-mapping>
    </web-app>
    while running the servlet , i am unable to retrieve the data
    The error message i am getting is
    A program for connecting oracle database
    ERROR : java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
    after running the servlet.
    what could be the problem?

    import java.io.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class myserv extends HttpServlet
    public void doGet(HttpServletRequest req,HttpServletResponse res)throws ServletException,IOException
    res.setContentType("text/html");
    PrintWriter pw=res.getwriter();
    pw.println("Connecting data base");
         try
         Class.forName("oracle.jdbc.driver.OracleDriver");
         Connection con=Drivermanager.getConnection("jdbc:oracle:thin:@localhost:1521:orcl","scott","tiger");
         Stamtenet st=con.createStament();
         Resultset rs=con.executeQurey("select * from emp");
         while(rs.next())
         rs.getInt("empno")+" "+rs.getDouble("sal"));
         }catch(Exception e)
    }

  • How to extract image from oracle database and display at html page

    Could you help me how to make the image to display. i manage to extract the data but the data is in Blob so i need to convert it so make it display at html page.

    Thanks for ur reply Mr.Rajasekhar
    I tried as u said,
    i tried without converting to sql date ,but still i din't get any results
    java.text.SimpleDateFormat dateFormat=new java.text.SimpleDateFormat("dd/MM/yyyy");
             java.util.Date fromDate=dateFormat.parse(startDate);
            java.util.Date tillDate=dateFormat.parse(endDate);          
              String query1="select MTName,Date,MTLineCount from linecountdetails where mtname='"+MTName+"'  and Date >='"+fromDate+"' and Date <='"+tillDate+"' " ;
            System.out.println(query1);
    //From main method
    databaseConnection("prasu","1/12/2005","31/12/2005");I got the output as
    ---------- java ----------
    select MTName,Date,MTLineCount from linecountdetails where mtname='prasu'  and Date >='Thu Dec 01 00:00:00 GMT+05:30 2005' and Date <='Sat Dec 31 00:00:00 GMT+05:30 2005'
    java.lang.NullPointerException
    null
    null
    java.lang.NullPointerException
    Output completed (4 sec consumed) - Normal TerminationThanks
    Prasanna.B

  • Extracting date from oracle/other databases exactly to java

    Hello Friends,
    Iam creating a simple program which extracts data from any database and stores it in an XML file and also it can extract data from an XML file and updates the database.
    My program is just getting the tablename as an input and from that it builds the query (select * from tablename). Through ResultSet, Iam extracting date fields with getDate() method of ResultSet, which is yeilding converted dates [In oracle if date is 23-DEC-1980, Im getting it as 1980-12-23 in java]. Even getString() method of ResultSet doesn't work.
    I want my program to work with any database engine, which may have their own date formats. Kindly can anyone suggest me a way to extract date from any database exactly as it is to java.
    NOTE:: I can't use to_char(datefield) type commands in SQLQUERY as the only input to my program is tablename and my query is, select * from tablename.
    Regards,
    Ch.Praveen.

    HI Friends,
    Thanks for your fast replies. My program is extracting data from a database and generating an XML file for it, which is as follows.
    <?xml version="1.0" encoding="UTF-8"?>
    <table tableName="EMP">
    <row>
    <column columnName="EMPNO" columnType="NUMBER">7369</column>
    <column columnName="ENAME" columnType="VARCHAR2">'SMITH'</column>
    <column columnName="JOB" columnType="VARCHAR2">'CLERK'</column>
    <column columnName="MGR" columnType="NUMBER">7902</column>
    <column columnName="HIREDATE" columnType="DATE">'1980-12-17'</column>
    <column columnName="SAL" columnType="NUMBER">800</column>
    <column columnName="COMM" columnType="NUMBER" />
    <column columnName="DEPTNO" columnType="NUMBER">20</column>
    </row>
    <row>
    <column columnName="EMPNO" columnType="NUMBER">7499</column>
    <column columnName="ENAME" columnType="VARCHAR2">'ALLEN'</column>
    <column columnName="JOB" columnType="VARCHAR2">'SALESMAN'</column>
    <column columnName="MGR" columnType="NUMBER">7698</column>
    <column columnName="HIREDATE" columnType="DATE">'1981-02-20'</column>
    <column columnName="SAL" columnType="NUMBER">1600</column>
    <column columnName="COMM" columnType="NUMBER">300</column>
    <column columnName="DEPTNO" columnType="NUMBER">30</column>
    </row>
    </table>
    Here you can observe that HIREDATE column is having date in different format than in oracle. We are getting an error while we are extracting data from an XML file and updating the database, as dateformats differ. Can anyone provide a solution, which extracts date from database to java exactly as per the dateformat in database.

  • Extract data from Oracle in excel file

    Hi,
    I have a requirement where in I need to extract data from Oracle in excel file and the excel worksheet name should be "Data".
    for eg. excel file name "AR Data_DDMMYY" and excel worksheet name "Data"
    I have used the UTL_FILE API to extract the tab delimited data which can be opened in excel but it is not exactly an excel file as the worksheet name is same as the file name.
    I tried using utl_file.fcopy and frename.
    Is there any way to do this using PLSQL?
    select * from v$version;
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
    PL/SQL Release 10.2.0.5.0 - Production
    "CORE     10.2.0.5.0     Production"
    TNS for HPUX: Version 10.2.0.5.0 - Production
    NLSRTL Version 10.2.0.5.0 - ProductionSample Code:
    declare
    cursor c is
    select * from scott.emp;
    v varchar2(100);
    f utl_file.file_type;
    file_name varchar2(100) := 'AR Data.xls';
    dir varchar2(50) := 'CESDIR191710';
    --select * from dba_directories
    begin
    f := utl_file.fopen(dir, file_name, 'W');
    v := 'EMPNO'||chr(9)||'ENAME'||chr(9)||'JOB'||chr(9)||'SAL'||chr(9)||'HIREDATE'||chr(9)||'DEPTNO';
    utl_file.put_line(f, v);
    for i in c
    loop
    v := i.empno||chr(9)||i.ename||chr(9)||i.job||chr(9)||i.sal||chr(9)||i.hiredate||chr(9)||i.deptno;
    utl_file.put_line(f, v);
    end loop;
    utl_file.fclose(f);
    --utl_file.frename(dir, file_name, dir, replace(file_name, '.xls', '_')||to_char(sysdate, 'MMDDYY')||'.xls', false);
    utl_file.fcopy(dir, file_name, dir, replace(file_name, '.xls', '_')||to_char(sysdate, 'MMDDYY')||'.xls');
    end;Thanks
    Imran

    Imran Soudagar wrote:
    Hi,
    I was able to generate the excel 2007 file with the data using the package from below link;
    http://technology.amis.nl/2011/02/19/create-an-excel-file-with-plsql/
    but the requirement is to generate excel 2003 file.
    I tried changing the .xlsx to .xls and it gives a note while opening the file "The file you are trying to open, abc.xls, is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?"Then you have three options:
    1) stop using anton's package and find another one that supports the old and deprecated version of Excel 2003
    2) write your own package to produce an Excel file.
    3) Upgrade your version of Excel to a recent version
    I tried the programs from other links on the forum but I am still getting this message. The client does not want this message to be displayed as the excel file works as an input to another system.
    Can anyone help me with the issue?
    Also, is it true that the programatically generated excel file is actually an xml file which is renamed to .xls and hence it shows the message while opening such files?Yes, Excel supports several different formats for it's files. By default, if you save an XLS files from Excel, it writes it out in a Microsoft proprietary binary format, which you would be hard pushed to replicate easily from PL/SQL. Excel also has the ability to save it's files as XML format, which is more readable and easier to produce programatically, whilst still allowing you to have multiple sheets, formulas and formatting included in it. That's the format that most people who need formatting and multiple sheets opt for when programatically generating their data as excel workbooks. (There's also an SLYK format that people used to use before that, but it's not as flexible)
    If you want to write your own, the easiest thing to do is to start with a blank workbook in Excel, and put in your basic requirements e.g. a couple of named sheets, and some data in different formats (number, date, text etc.) and different formatting options etc. Save that file in XML format from Excel and then open up the file using notepad/wordpad to look at the structure. There'll be a whole load of redundant rubbish Microsoft put in there, but you should be able to figure out the basic structure of XML required to give you what you want.

  • Retriving data from oracle database

    hi all,
    i have connected to oracle database  and i want retrieve data from that database.can u please give the procedure how to retrieve data and how to load it into info cube

    Hi,
    You can use either DB connect or UD connect for extracting data from external database.
    DB Connect:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2f0fea94-0501-0010-829c-d6b5c2ae5e40
    UD Connect:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/58f4db47-0501-0010-a2bf-ff01b150fdff
    Also please search in SDN, you will find lot of threads related to this topic.
    regards,
    Pruthvi R

  • How to Extract Data from Oracle DB ?

    hi,
    I am trying to Extract Data from Oracle DB using DBconnect. and looks like its not working. Not able to connect to Database.
    thanks

    Hi,
    Can you please follw the below steps:
    If you need to load data from an Oracleu2122 database use DB Connect instead of an ETL Tool
    Although limited to full updates, it allows true u201Chands-offu201D automation of data extraction
    Is not limited to Oracleu2122 databases, it supports ALL database systems supported by SAP BW
    DB Connect can read the remote data dictionary, replicate table and views, and transfer metadata into the SAP BW Meta Data Repository.
    1.Begin with your data model
    2.Identify which tables provide:
      Master Data
    Transactional Data
    3.Once the model is complete:
    Obtain a UID and Password from the DBA
    Ensure that table synonyms are not used u2013 they donu2019t work at this point in time (SAP Note # 518241)
    Your UID has to have select permissions on the required database objects.
    4.In the admin workbench open the modeling tab and select Source Systems
    5.In the right pane, right-click on Source Systems and select Createu2026
    6. you have to define the type of source system. Select u201CDatabase Systemu201D
    7.Enter a description for the source system
    8.Once you accept the definition of the source system, you have to provide the following information, save and back out:
    DBMS: ORA (Oracle)
    User Name: Your UID
    DB password: Your pwd
    Conn. Info: sql*net string
    Select u201CPermanent connectionu201D if this is the case
    9.If everything went well, you should see the new source system. When you do a right-click and ask for the DataSource overview, the first time you execute it you will be prompted to generate the application hierarchy. Answer yes to the prompt and then you will be able to see the DataSource tree.
    10.In order to test connectivity, right-click on the source system and select u201CSelect Database Tablesu201D
    11.Click on the execute button.
    12.Next shows up displaying any tables or views that you have access through your UID
    13.Select a table or view and click on u201CEdit DataSourceu201D.
    14.To test data retrieval, click on u201CDisplay table contentsu201D
    15.Designate the application component, determine the type of DataSource (Text, Master data, or Transaction data) then generate the DataSource.
    16.For each applicable table/view generate the repeat steps 13 to 15.
    17.From there, assign the DataSource to each target (InfoObject, InfoProvider) as usual.
    Moving from Dev to QA to Prod:
    18.Before transporting all you configuration work, you will have to manually set up the source system (Steps 4 to 8) in your QA or Prod
    19.Depending on your authorization settings in Production, you may need to implement a system restore. Work with BASIS if you need to, donu2019t do it on your own!
    20.Then transport your InfoObjects, InfoProviders, Update Rules, Transfer Rules, InfoPackages, etc.
    21.If you developed the process chains, transport them separately.
    22.Try to maximize throughput by using parallel processing of master data
    23.Ensure the right sequence for transactional data loads is followe.
    24.Combine the master data loads and the transactional data loads in a master process chain.
    It can be help full.
    Regards,

  • How to I convert data from oracle database into excel sheet

    how to I convert data from oracle database into excel sheet.
    I need to import columns and there datas from oracle database to microsoft excel sheet.
    Please let me know the different ways for doing this.
    Thanks.

    asktom.oracle.com has an excellent article on writing a PL/SQL procedure that dumps data to an Excel spreadsheet-- search for 'Excel' and it'll come up.
    You can also use your favorite connection protocol (ODBC, OLE DB, etc) to connect from Excel to Oracle and pull the data out that way.
    Justin

  • Import data from oracle database table into csv file

    Hi
    I have to import data from a table into a csv file. Could anyone suggest the best method to do it? My application is JSP as frontend and have put business logic in servlet.
    Thanks in advance.

    FastReader from wisdomforce will help you quickly export data into csv file. http://www.wisdomforce.com
    fastreader can be called and executed as an external process ( Runtime.exec(..) ) to extract data from Oracle tables into flat file

  • Walkthrough: Displaying Data from Oracle database in a Windows application.

    This article is intended to illustrate one of the most common business scenarios such as displaying data from Oracle database on a form in a Windows application using DataSet objects and .NET Framework Data Provider for Oracle.
    You can read more at http://www.c-sharpcorner.com/UploadFile/john_charles/WalkthroughDisplayingDataOracleWindowsapplication05242007142059PM/WalkthroughDisplayingDataOracleWindowsapplication.aspx
    Enjoy my article.

    hi,
    this is the code :
    public class TableBean {
    Connection con ;
    Statement ps;
    ResultSet rs;
    private List perInfoAll = new ArrayList();
    public List getperInfoAll() {
    int i = 0;
    try
    con = DriverManager.getConnection("url","root","root");
    ps = con.createStatement();
    rs = ps.executeQuery("select * from user");
    while(rs.next()){
    System.out.println(rs.getString(1));
    perInfoAll.add(i,new perInfo(rs.getString(1),rs.getString(2),rs.getString(3)));
    i++;
    catch (Exception e)
    System.out.println("Error Data : " + e.getMessage());
    return perInfoAll;
    public class perInfo {
    String uname;
    String firstName;
    String lastName;
    public perInfo(String firstName,String lastName,String uname) {
    this.uname = uname;
    this.firstName = firstName;
    this.lastName = lastName;
    public String getUname() {
    return uname;
    public String getFirstName() {
    return firstName;
    public String getLastName() {
    return lastName;
    ADF table code:
    <af:table value="#{tableBean.perInfoAll}" var="row"
    binding="#{backing_Display.table1}" id="table1">
    <af:column sortable="false" headerText=""
    align="start">
    <af:outputText value="#{row.firstName"/>//---> Jdeveloper 11g doesn't allow me to use this.. it says firstName is an unknown property..
    </af:column>
    </af:table>
    Please tell me is this the way to do it.. or is it a must to use the DataCollection from the data controls panel...
    Thanks...

  • How to Extract data from Oracle DB to BW via DBConncet interface.

    HI All,
    Do you know how to extract data from ORACLE data base to BW, using DBConnect.
    Here we are not using R/3 Business content structures.
    How to do it in both source system  and BW side?
    How to define structures on both sides.
    Please provide any documents on that.
    Thanks in Advance.
    Sri.

    Hi Srilaxmi
    Have a look at these links
    http://help.sap.com/saphelp_nw04/helpdata/en/58/54f9c1562d104c9465dabd816f3f24/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/a1/89786c3df35c4ea930a994e884bb4c/content.htm
    http://help.sap.com/saphelp_bw30b/helpdata/en/80/1a618ae07211d2acb80000e829fbfe/content.htm
    and  this thread
    Extract from Oracle View with DB connect
    regards
    KR

  • To fetch data from Oracle Database

    Hi Gents,
    Any alternative option other than SQL to fetch data from Oracle DAtabase. ( My manager worked on Mainframes he is telling other than SQL there should be some options.. Gents pls guide if any options.......
    REgards
    Fento

    >
    Any alternative option other than SQL to fetch data from Oracle DAtabase. ( My manager worked on Mainframes he is telling other than SQL there should be some options.. Gents pls guide if any options.......
    >
    There is no other (supported) way to get data from Oracle Databases as SQL. No matter what third-party tool you use to access Oracle Databases, they all will use (embedded) SQL.
    In very rare cases, one must use tools to read from datafiles directly because the database got damaged and a proper recovery is impossible. That is an emergency solution and by no means a replacement for SQL access.
    In short: No :-)
    Kind regards
    Uwe
    http://uhesse.wordpress.com

  • Want to see on screen data from oracle database using php

    I am struggling on the problem of echoing data from Oracle database (9i) to the screen for viewing. For ex. the data has records from various cities. when a particular city is inputted as prompt, all the records for the that city from the table should appear through PHP. Can someone help me?

    Thank you very much for giving the link. I tried and it is working. Only, I am still struggling with trying to get many fields from the database on the screen for viewing. Ex. a prompt to ask which country and which month. If I give India and December it must give all the data pertaining to India for December. This AJAX was very useful, as it gave lot of tips, but my basic query to see the data thru PHP from my database is still unsolved. Any help??
    Jacob
    Thanks once again for the help.

Maybe you are looking for

  • Mail backup folders corrupted

    I have been trying to restore my mail folders with Time Machine (total 10G or so). The actual restoration goes fine but the folders seem to have been corrupted in some way so when Mail is restarted it insists on re-importing all my mail. This process

  • Unable to use Auto setting or 100BaseTx in either full or half duplex!

    Hi here is the issue, I have a small home network of three desktops, one laptop (wireless) and two game consoles with a WRTP54G router and cable modem. I have noticed that if I try to change the NIC setting on any device to either Auto or 100BaseTx i

  • When double to digital indicator set to display in time format... Value changes.

    Dear all, I am having trouble displaying the value I want. I have a double value say 320 sent to a digital indicator where I have edited the properites of it to display in a time format containing only minutes and seconds like so, '3:20'. Unfortunate

  • DB2 lookup, Line by line processing via PI

    Hello Experts, I have a requirement. Using websphere middleware the consultants were able to read a huge file one line at a time. Do DB2 look ups for several fields, write JAVA code against the same for validation, summing up etc, write up error logs

  • Saving from bridge and converting from raw to jpeg

    why can I not convert from raw to jpeg in bridge (camera raw) and save to a location different from the  original