How do i import my local csv files into HANA database as temporary tables  using java program?

I want to import my local csv file into database for further apply Join with other tables programmatic in JAVA

Hi Vivek,
Please go through the following blogs and video to resolve your issue.
Loading large CSV files to SAP HANA
HANA Academy - Importing Data using CTL Method - YouTube
Hope it helps.
Regards
Kumar

Similar Messages

  • How can I import an existing csv. file into Outlook on a Mac with OS10.7

    Tried to import a csv. file on my Mac (OS 10.7.2) into Microsoft Outlook 2011 (for Mac) on the same computer, ended up with a useless Excel page - it opened the csv file in Excel with only a few contacts and uselessly formatted, at that!. Also, tried to save the csv file as a text file, then importing it into Word 2011 and Excel, with the same results. Anyone able to help? Would like to have the contained address/contact info look concise and neat, without duplicates or garbled/missing information.
    [email protected]

    DPS can use H.264 files, but I have no idea about the details since I've never done any of it myself. Ask in the ID/ DPS forums.
    Mylenium

  • How to import an .csv file into the database?

    and can we code the program in JSP to import the.csv file into the database.

    It is better to use Java class to read the CSV file and store the contents in the database.
    You can use JSP to upload the CSV file to the server if you want, but don't use it to perform database operations.
    JSPs are good for displaying information on the front-end, and for displaying HTML forms, there are other technologies more suitable for the middle layer, back end and the database layer.
    So break you application into
    1) Front end - JSPs to display input html forms and to display data retrieved from the database.
    2) Middle layer - Servlets and JavaBeans to interact with JSPs. The code that reads the CSV file to parse it's contents should be a Java Class in the middle layer. It makes use of Java File I/O
    3) Database layer - Connects to the database using JDBC (Java Database Connectivity), and then writes to the database with SQL insert statements.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Keeping the above concepts in mind, first build a simple JSP and get it to work,
    then research on Google , for Java File I/O , discover how to read a file,
    Then search on how to readh a CSV file using Java.
    After researching you should be able to read the CSV file line by line and store each line inside a Collection.
    Then research on Google, on how to write to the database using JDBC
    Write a simple program that inserts something to a dummy table in the database.
    Then, read the data stored in the Collection, and write insert statements for each records in the collection.

  • How do I import Map Info Tab files into Spatial for a map of europe?

    How do I import Map Info Tab files into Spatial for a map of europe via FME and have oracle spatial draw the map without problems?
    So far I've got to the stage where I can import the data, spatially index it (in oracle 9i) and get my SVG (scaleable vector graphics) application to view the map.
    The problem is that countries that have more than one polygon (more than one row in the database) do not draw properly.
    When I view the Map Info tab file in the FME viewer I can see that the data is fine, but I can also see that some of the polygons used to draw a country are donugts and some aren't.
    This seems to cause a problem when I import the data into oracle spatial as I don't know if a row in the table needs to be inserted as an independent SDO_GEOMETRY or if it should form part of a larger SDO_GEOMETRY (as in 2 or more rows make up the polygon shape for a country).
    I have a feeling that I'm not using FME correctly, because at the moment I have to import the tab file into Oracle then re-insert the data into a spatially formatted table (one with a spatial index) - I get the impression that FME should do that for me but as I'm new to this I don't really know.
    Any Help welcome :|
    Tim

    Tim,
    MapInfo has a free utility called EasyLoader that allows you to upload a table directly to Oracle. EasyLoader creates the geometries and spatial index. You can download it free from http://www.mapinfo.com/products/download.cfm?ProductID=1044
    Andy Greis
    CompuTech Inc.

  • How to read/write .CSV file into CLOB column in a table of Oracle 10g

    I have a requirement which is nothing but a table has two column
    create table emp_data (empid number, report clob)
    Here REPORT column is CLOB data type which used to load the data from the .csv file.
    The requirement here is
    1) How to load data from .CSV file into CLOB column along with empid using DBMS_lob utility
    2) How to read report columns which should return all the columns present in the .CSV file (dynamically because every csv file may have different number of columns) along with the primariy key empid).
    eg: empid report_field1 report_field2
    1 x y
    Any help would be appreciated.

    If I understand you right, you want each row in your table to contain an emp_id and the complete text of a multi-record .csv file.
    It's not clear how you relate emp_id to the appropriate file to be read. Is the emp_id stored in the csv file?
    To read the file, you can use functions from [UTL_FILE|http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_file.htm#BABGGEDF] (as long as the file is in a directory accessible to the Oracle server):
    declare
        lt_report_clob CLOB;
        l_max_line_length integer := 1024;   -- set as high as the longest line in your file
        l_infile UTL_FILE.file_type;
        l_buffer varchar2(1024);
        l_emp_id report_table.emp_id%type := 123; -- not clear where emp_id comes from
        l_filename varchar2(200) := 'my_file_name.csv';   -- get this from somewhere
    begin
       -- open the file; we assume an Oracle directory has already been created
        l_infile := utl_file.fopen('CSV_DIRECTORY', l_filename, 'r', l_max_line_length);
        -- initialise the empty clob
        dbms_lob.createtemporary(lt_report_clob, TRUE, DBMS_LOB.session);
        loop
          begin
             utl_file.get_line(l_infile, l_buffer);
             dbms_lob.append(lt_report_clob, l_buffer);
          exception
             when no_data_found then
                 exit;
          end;
        end loop;
        insert into report_table (emp_id, report)
        values (l_emp_id, lt_report_clob);
        -- free the temporary lob
        dbms_lob.freetemporary(lt_report_clob);
       -- close the file
       UTL_FILE.fclose(l_infile);
    end;This simple line-by-line approach is easy to understand, and gives you an opportunity (if you want) to take each line in the file and transform it (for example, you could transform it into a nested table, or into XML). However it can be rather slow if there are many records in the csv file - the lob_append operation is not particularly efficient. I was able to improve the efficiency by caching the lines in a VARCHAR2 up to a maximum cache size, and only then appending to the LOB - see [three posts on my blog|http://preferisco.blogspot.com/search/label/lob].
    There is at least one other possibility:
    - you could use [DBMS_LOB.loadclobfromfile|http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_lob.htm#i998978]. I've not tried this before myself, but I think the procedure is described [here in the 9i docs|http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96591/adl12bfl.htm#879711]. This is likely to be faster than UTL_FILE (because it is all happening in the underlying DBMS_LOB package, possibly in a native way).
    That's all for now. I haven't yet answered your question on how to report data back out of the CLOB. I would like to know how you associate employees with files; what happens if there is > 1 file per employee, etc.
    HTH
    Regards Nigel
    Edited by: nthomas on Mar 2, 2009 11:22 AM - don't forget to fclose the file...

  • How do I import iPhoto raw (NEF) files into Lightroom 3.6?

    how do I import iPhoto raw (NEF) files into Lightroom 3.6?

    You will need an application that can convert those pcd files into one that iPhoto supports, mainly jpeg. GraphicConverter is supposed to support many, many formats and might just support the pcd. If so you could use it to convert them to jpegs.
    There's an automator workflow that I've put into an application that will take many image files and convert them into jpeg with the RGB color profile. I've never tried it on the Kodak files but you can give it a try. It's called +*Convert to JPG and Embed sRGB profile*+ and can be downloaded from Toad's Cellar. Make a copy of a couple of files and see if it will work. If so then you can batch convert folders of the files at once by dragging them onto the application.
    I believe GC can do batch conversions but am not familiar with the application.

  • How do i import pdf or doc file into ppt?

    how do i import pdf or doc file into ppt?

    This forum is for questions related to https://workspaces.acrobat.com.
    Perhaps you would get a better answer in the Microsoft Powerpoint forum: http://answers.microsoft.com/en-us/office/forum/PowerPoint?auth=1

  • Script to import contacts from CSV file into Address Book

    Hi,
    I am wondering if it would be possible to import contacts from a CSV file into a group in Address Book using applescript, and if so, if anyone is aware of a script that does this or something similar.
    I have a CSV file with three columns 'First Name', 'Last Name' and 'Email Address'.  I would like these to correspond with  'First', 'Last' and (Work) 'Email' in Address Book.
    Ideally the script would also check to see if entries already exist for the people being imported, but this is less crucial.
    Thanks in advance for any assistance,
    Nick

    Hi,
    Test this on a very small csv file (four or five contacts) to see if it works for you. It will not de-duplicate. You don't give the name of the group, so you'll need to replace Name of group in the second line with your group name, enclosed in double quotes.
    --begin script
    set the_people to read (choose file with prompt "Choose your CSV file")
    set the_group to "Name of group"
    set old_tids to AppleScript's text item delimiters
    set AppleScript's text item delimiters to ","
    set par_count to (count paragraphs in the_people)
    repeat with x from 1 to par_count
              set next_par to paragraph x of the_people
              set first_name to text item 1 of next_par
              set last_name to text item 2 of next_par
              set e_mail to text item 3 of next_par
              tell application "Address Book"
                        set nu_person to make new person with properties {first name:first_name, last name:last_name}
      make new email at end of emails of nu_person with properties {label:"Work", value:e_mail}
                        add nu_person to group the_group
      save
              end tell
    end repeat
    set AppleScript's text item delimiters to old_tids
    --end script
    Watch out for bad line breaks in the lines beginning "set nu_person..." and "make new email..."

  • Issue loading CSV file into HANA

    Hi,
    From last couples of weeks i am trying to load my CSV file into HANA Table, but i am unable to succeed.
    I am getting error "Cannot open Control file, /dropbox/P1005343/CRM_OBJ_ID.CTL". I have followed each and every step in SDN, still I could not load data into my HANA table.
    FTP: /dropbox/P1005343
    SQL Command:
    IMPORT FROM '/dropbox/P1005343/crm_obj_id.ctl'
    Error:
    Could not execute 'IMPORT FROM '/dropbox/P1005343/crm_obj_id.ctl''
    SAP DBTech JDBC: [2]: general error: Cannot open Control file, /dropbox/P1005343/crm_obj_id.ctl
    Please help me on this
    Regards,
    Praneeth

    Hi All,
    I have successfully loaded the file into HANA database in folder P443348 but while importing file, I am getting the following error message such as
    SAP DBTECH JDBC: [2]  (at 13) : general error: Cannot open Control file, "/P443348/shop_facts.ctl"
    This is happening while I am executing the following import statement
    IMPORT FROM '/P443348/shop_facts.ctl';
    I have tried several options including changing the permissions of the folders and files to no success. As of now my folder has full access, which is 777
    Any help would be greatly appreciated so that I can proceed further
    Thanks
    Vamsidhar

  • How To Split Large Excel or CSV Files into Smaller Files

    Does anyone know how to split a large Excel or CSV file into multiple smaller files?  Or, is there an app that will work with Mac to do that?

    split [-a suffix_length] [-b byte_count[k|m]] [-l line_count] [-p pattern] [file [name]]
    is a native Terminal command. Read up more on https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/ man1/split.1.html
    I prefer to use gSplit which is gnu coreutils.
    You can install gnu coreutils using homebrew.

  • Import and view CSV Files into OTM

    Hi All,
    Can you please help me in importing CSV files into Oracle Test Manager and to view the imported files in OTM.

    Hi,
    I have just googled and find the link :)
    http://oracleats.com/blog/?p=785

  • How do I import a SPSS .sav file into SQL 2008 r2 using SSIS

    Hi there,
    Like the title says, I'm trying to import an SPSS .SAV file into an SQL 2008 R2 database using SSIS.
    I've tried a few things, but i cant seem to get it to work properly. I'm hoping there's someone out there who could point me in the right direction.
    I've tried the following:
    Tried the IBM step by step manual (http://pic.dhe.ibm.com/infocenter/spssdc/v6r0m1/index.jsp?topic=%2Fcom.spss.ddl%2Faccess_odbc.htm)
    --Couldnt folow this guide because I didnt have the SPSS MR DM-2 OLE DB Provider.
    Tried installing the provider using (http://pic.dhe.ibm.com/infocenter/spssdc/v7r0m0/index.jsp?topic=%2Fcom.spss.ddl%2Fdts_troubleshooting.htm) as a guide to download the provider listed (www-03.ibm.com/software/products/nl/spss-data-model).
    --This didnt work, I still could not see the provider listed after install and rebooting the server.
    Tried to get the file as CSV (Company couldnt provide it in CSV or another format)
    The server is a Windows Server 2008 R2 Enterprise 64-bit, has the Data Collection Data Model installed on it with SQL Server 2008 R2.
    If anyone could point me in the right direction they could make my day!
    Thanks in advance!
    Ronny

    Hi Ronny,
    According to your description, you want to import a SPSS .sav file to SQL Server 2008 R2 database. If that is the case, we can achieve this requirement with SPSS or SQL query. For more details, please refer to the following methods:
    http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=93346
    http://ilovespss.blogspot.com/2007/10/migrating-data-from-spss-to-sql-server.html
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • How to import data from CSV file into a table by using oracle forms

    Hi,
    I have a CSV file and i want to insert in oracle database in a table by using a button in oracle forms.
    the user can select CSV file by using open dialog .
    can any one help me to find method to make import and select file from the client machine ?
    thx.

    1. create table blob
    CREATE TABLE IB_LOVE
      DOC          BLOB,
      CONTRACT_NO  VARCHAR2(20 BYTE)                NOT NULL
    )2. use the code below to insert:
           INSERT INTO ordmgmt.ib_love
                       (contract_no, doc
                VALUES (:control.contract_no_input, NULL
           lb$result :=
             webutil_file_transfer.client_to_db (:b2.file_name, v_file_blob_name, v_col_blob_name,
                                                 'CONTRACT_NO = ' || :control.contract_no_input);
           :SYSTEM.message_level := 25;
           COMMIT;
           :SYSTEM.message_level := 0;3. use the code below to download
         if :control.CONTRACT_NO_INPUT is not null then
              vboolean :=   webutil_file_transfer.DB_To_Client_With_Progress(
                               vfilename,  --filename                       
                              'IB_LOVE', ---table of Blob item                       
                              'DOC',  --Blob column name                       
                              'CONTRACT_NO = ' || :CONTROL.CONTRACT_NO_INPUT, ---where clause to retrieve the record                       
                              'Downloading from Database', --Progress Bar title                       
                              'Wait to Complete'); --Progress bar subtitle  client_host('cmd /c start '||vfilename);
              client_host('cmd /c start '||vfilename);                 
         else
              errmsg('Please choose contract no');
         end if;4. use the code below to open file dialog
    x:= WEBUTIL_FILE.FILE_OPEN_DIALOG ( 'c:\', '*.gif', '|*.gif|*.gif|', 'My Open Window' ) ;
    :b2.FILE_NAME:=X;

  • How to display data from local csv files (in a folder on my desktop) in my flex air application using a datagrid?

    Hello, I am very new to flex and don't have a programming background. I am trying to create an air app with flex that looks at a folder on the users desktop where csv files will be dropped by the user. In the air app the user will be able to browse and look for a specific csv file in a list container, once selected the information from that file should be displayed in a datagrid bellow. Finally i will be using Alive PDF to create a pdf from the information in this datagrid laid out in an invoice format. Bellow is the source code for my app as a visual refference, it only has the containers with no working code. I have also attached a sample csv file so you can see what i am working with. Can this be done? How do i do this? Please help.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="794" height="666">
        <mx:Label x="280" y="19" text="1. Select Purchase Order"/>
        <mx:List y="45" width="232" horizontalCenter="0"></mx:List>
        <mx:Label x="158" y="242" text="2. Verify Information"/>
        <mx:DataGrid y="268" height="297" horizontalCenter="0" width="476">
            <mx:columns>
                <mx:DataGridColumn headerText="Column 1" dataField="col1"/>
                <mx:DataGridColumn headerText="Column 2" dataField="col2"/>
                <mx:DataGridColumn headerText="Column 3" dataField="col3"/>
            </mx:columns>
        </mx:DataGrid>
        <mx:Label x="355" y="606" text="3. Generated PDF"/>
        <mx:Button label="Click Here" horizontalCenter="0" verticalCenter="311"/>
    </mx:WindowedApplication>

    Open the file, parse it, populate an ArrayCollection or XMLListCollection, and make the collection the DataGrid dataProvider:
    http://livedocs.adobe.com/flex/3/html/help.html?content=Filesystem_08.html
    http://livedocs.adobe.com/flex/3/html/help.html?content=12_Using_Regular_Expressions_01.ht ml
    http://livedocs.adobe.com/flex/3/html/help.html?content=dpcontrols_6.html
    http://livedocs.adobe.com/flex/3/langref/mx/collections/ArrayCollection.html
    http://livedocs.adobe.com/flex/3/langref/mx/collections/XMLListCollection.html
    If this post answered your question or helped, please mark it as such.

  • Error loading local CSV file into external table

    Hello,
    I am trying to load a CSV file located on my C:\ drive on a WIndows XP system into an 'external table'. Everyting used to work correctly when using Oracle XE (iinstalled also locally on my WIndows system).
    However, once I am trynig to load the same file into a Oracle 11g R2 database on UNIX, I get the following errr:
    ORA-29913: Error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    error opening file ...\...\...nnnnn.log
    Please let me know if I can achieve the same functionality I had with Oracle XP.
    (Note: I cannot use SQL*Loader approach, I am invoking Oracle stored procedures from VB.Net that are attempting to load data into external tables).
    Regards,
    M.R.

    user7047382 wrote:
    Hello,
    I am trying to load a CSV file located on my C:\ drive on a WIndows XP system into an 'external table'. Everyting used to work correctly when using Oracle XE (iinstalled also locally on my WIndows system).
    However, once I am trynig to load the same file into a Oracle 11g R2 database on UNIX, I get the following errr:
    ORA-29913: Error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    error opening file ...\...\...nnnnn.log
    Please let me know if I can achieve the same functionality I had with Oracle XP.
    (Note: I cannot use SQL*Loader approach, I am invoking Oracle stored procedures from VB.Net that are attempting to load data into external tables).
    Regards,
    M.R.So your database is on a unix box, but the file is on your Windows desktop machine? So .... how is it you are making your file (on your desktop) visible to your database (on a unix box)???????

Maybe you are looking for

  • Upload of purchase order details using LSMW

    Hi friends, I encountered a problem while uploading purchase order details using LSMW . in the field mapping I could not able to fine the field TCODE. as a result I could not assign the transaction code ME21. could you please suggest me a solution.  

  • Vendor Master - Export License - MEK3

    All, We have 3 raw material vendors for which we have an export licence. Is there a way to record these in the vendor master ? This would have to affect the conditions leading to the determination of the tax key. We tried the info records, but these

  • Numbers "full screen" in Lion doesn't display filename.

    Since Apple is hyping full screen use, isn't that rather important considering versioning and all.  Am I missing something?

  • Tibook useful in 2014

    Advice would be greatly appreciated on the following; Recently I rediscovered my old Tibook in storage and as it booted up, and contains a myriad of software albeit dated - Reason, Quark, Indesign, Premier etc. I was considering giving this to my 11y

  • Problems setting cache size,

    Hi, I hope I m in the right category for this question: I m reading in a csv table, and putting it in one primary database ( DB_QUEUE ) and several secondary databases ( DB_BTREE ). I m using the Berkeley DB 4.7 for with C++. For the primary database