Loading Date fields from flat file to Oracle tables

Hi,
I have a flat file with a few date columns. I have given the format for the date field while creating the data store for the flat file. The format I used is 'YYYY-MM-DD'.
But I get an error when I execute it after associating the module with LKM & IKM.
The error message is as follows:
org.apache.bsf.BSFException: exception from Jython: Traceback (innermost last):
File "<string>", line 3, in ?
OS command has signalled errors
Can anyone help me out.
Thanks

At the time of DataStore creation. You take that date field as string.
After this, in interface, when you map this date field with table field. You should use CONVERT(<field name>,DATE) in expression editor.

Similar Messages

  • Short dump while reading a currency field from Flat file into internal tabl

    Hi,
    I am getting a short dump........saying number conversion dump (while reading a currency value into field in internal table from a fixed lenght flat file).........
    Do I need to use a string variable to get the value from flat file or how ??
    Please suggest.

    Santosh,
    Thanks for your inputs,
    But my internal table type is of DEC (5,2) , I am getting that... it needs to be of type 'C'. Can you suggest.
    Ex :
    MOVE wa_temp-infile_string+106(8)  TO wa_item-QT_PERCENT
    This didnt work
    so i tried moving into a seperate variable
    MOVE wa_temp-infile_string+106(8)  TO v_percent.
    and then write to
    WRITE v_percent to  wa_item-QT_PERCENT.

  • Sending data from flat file or oracle table view to a IBM MQ

    Hi,
    We need a help in developing solution.
    We have a scenario, where data(multiple records) in source (table/file) needs to populated into a queue(JMS IBM MQ) as a single message. To achieve this we are trying a two step process.
    1)     We created a temp table to store multiple records from file, this temp table is having one column of *‘clob’* data-type which will store data from file into a single row. We are facing issue while loading data from file to staging area using LKM FILE TO ORACLE (SQLLDR)
    When we are executing interface, while creating C$ table it is going error out . Instead of taking clob (target write data type) it is taking varchar with +5000+ size whereas varchar supports only *4000*.
    create table SNPM.C$_0SINGLERECORD
    C1_C1 VARCHAR2(5000) NULL
    NOLOGGING
    Error message:
    910 : 42000 : java.sql.SQLException: ORA-00910: specified length too long for its datatype
    java.sql.SQLException: ORA-00910: specified length too long for its datatype
    Need help in sending data into destination table.
    2) After populating this data into destination(temp table) as a single record we need to send each row as a single message to JMS MQ. currently we are using LKM FILE to SQL to load into Staging area and IKM SQL TO JMS APPEND to put message in JMS MQ. We are succeeding in putting message of length < 4000 as these KMs are converting the data using varchar2, but we have data of large size+(>4K)+.
    Pointer/ solution will be of great help.
    Please let me know in case you need more description.

    The error message that is showing while using clob as datatype(which we created as user data type in data types section of respective technology)
    java.lang.NumberFormatException: For input string: "4294967295"
         at java.lang.NumberFormatException.forInputString(Unknown Source)
         at java.lang.Integer.parseInt(Unknown Source)
    while using varchar2 in creating C$ table following is the error:
    910 : 42000 : java.sql.SQLException: ORA-00910: specified length too long for its datatype
    java.sql.SQLException: ORA-00910: specified length too long for its datatype
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)

  • ODI error while loading data from Flat File to oracle

    Hi Gurus,
    I am getting following error while loading flat file to oracle table :
    ava.lang.NumberFormatException: 554020
         at java.math.BigInteger.parseInt(Unknown Source)
         at java.math.BigInteger.<init>(Unknown Source)
         at java.math.BigDecimal.<init>(Unknown Source)
         at com.sunopsis.sql.SnpsQuery.updateExecStatement(SnpsQuery.java)
         at com.sunopsis.sql.SnpsQuery.addBatch(SnpsQuery.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execCollOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlC.treatTaskTrt(SnpSessTaskSqlC.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
    The connections between source and target is fine.
    Kindly suggest on this error.
    Thanks
    Shridhar

    Hi John,
    The source is csv file. By default all columns are string type.The integration is failing at step 3 ( load Data).
    I am loading the data from csv file directly to staging table( oracle ).Its one to one mapping.
    Shridhar

  • How to load date and time from text file to oracle table through sqlloader

    hi friends
    i need you to show me what i miss to load date and time from text file to oracle table through sqlloader
    this is my data in this path (c:\external\my_data.txt)
    7369,SMITH,17-NOV-81,09:14:04,CLERK,20
    7499,ALLEN,01-MAY-81,17:06:08,SALESMAN,30
    7521,WARD,09-JUN-81,17:06:30,SALESMAN,30
    7566,JONES,02-APR-81,09:24:10,MANAGER,20
    7654,MARTIN,28-SEP-81,17:24:10,SALESMAN,30my table in database emp2
    create table emp2 (empno number,
                      ename varchar2(20),
                      hiredate date,
                      etime date,
                      ejob varchar2(20),
                      deptno number);the control file code in this path (c:\external\ctrl.ctl)
    load data
    infile 'C:\external\my_data.txt'
    into table emp2
    fields terminated by ','
    (empno, ename, hiredate, etime, ejob, deptno)this is the error :
    C:\>sqlldr scott/tiger control=C:\external\ctrl.ctl
    SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Commit point reached - logical record count 5
    C:\>any help i greatly appreciated
    thanks
    Edited by: user10947262 on May 31, 2010 9:47 AM

    load data
    infile 'C:\external\my_data.txt'
    into table emp2
    fields terminated by ','
    (empno, ename, hiredate, etime, ejob, deptno)Try
    load data
    infile 'C:\external\my_data.txt'
    into table emp2
    fields terminated by ','
    (empno, ename, hiredate, etime "to_date(:etime,'hh24:mi:ss')", ejob, deptno)
    this is the error :
    C:\>sqlldr scott/tiger control=C:\external\ctrl.ctl
    SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Commit point reached - logical record count 5
    C:\>
    That's not an error, you can see errors within log and bad files.

  • Loading data from .csv file into Oracle Table

    Hi,
    I have a requirement where I need to populate data from .csv file into oracle table.
    Is there any mechanism so that i can follow the same?
    Any help will be fruitful.
    Thanks and regards

    You can use Sql Loader or External tables for your requirement
    Missed Karthick's post ...alredy there :)
    Edited by: Rajneesh Kumar on Dec 4, 2008 10:54 AM

  • How to load the data from .csv file to oracle table???

    Hi,
    I am using oracle 10g , plsql developer. Can anyone help me in how to load the data from .csv file to oracle table. The table is already created with the required columns. The .csv file is having about 10lakh records. Is it possible to load 10lakh records. can any one please tell me how to proceed.
    Thanks in advance

    981145 wrote:
    Can you tell more about sql * loader??? how to know that utility is available for me or not??? I am using oracle 10g database and plsql developer???SQL*Loader is part of the Oracle client. If you have a developer installation you should normally have it on your client.
    the command is
    sqlldrType it and see if you have it installed.
    Have a look also at the FAQ link posted by Marwin.
    There are plenty of examples also on the web.
    Regards.
    Al

  • Data Load from XML file to Oracle Table

    Hi,
    I am trying to load data from XML file to Oracle table using DBMS_XMLStore utility.I have performed the prerequisites like creating the directory from APPS user, grant read/write to directory, placing the data file on folder on apps tier, created a procedure ‘insertXML’ to load the data based on metalink note (Note ID: 396573.1 How to Insert XML by passing a file Instead of using Embedded XML). I am running the procedure thru below anonymous block  to insert the data in the table.
    Anonymous block
    declare
      begin
      insertXML('XMLDIR', 'results.xml', 'employee_results');
      end;
    I am getting below error after running the anonymous block.
    Error :     ORA-22288: file or LOB operation FILEOPEN failed”
    Cause :   The operation attempted on the file or LOB failed.
    Action:   See the next error message in the error stack for more detailed
               information.  Also, verify that the file or LOB exists and that
               the necessary privileges are set for the specified operation. If
               the error still persists, report the error to the DBA.
    I searched this error on metalink and found DOC ID 1556652.1 . I Ran the script provided in the document. PFA the script.
    Also, attaching a document that list down the steps that I have followed.
    Please check and let me know if I am missing something in the process. Please help to get this resolve.
    Regards,
    Sankalp

    Thanks Bashar for your prompt response.
    I ran the insert statement but encountered error,below are the error details. statement.
    Error report -
    SQL Error: ORA-22288: file or LOB operation FILEOPEN failed
    No such file or directory
    ORA-06512: at "SYS.XMLTYPE", line 296
    ORA-06512: at line 1
    22288. 00000 -  "file or LOB operation %s failed\n%s"
    *Cause:    The operation attempted on the file or LOB failed.
    *Action:   See the next error message in the error stack for more detailed
               information.  Also, verify that the file or LOB exists and that
               the necessary privileges are set for the specified operation. If
               the error still persists, report the error to the DBA.
    INSERT statement I ran
    INSERT INTO employee_results (USERNAME,FIRSTNAME,LASTNAME,STATUS)
        SELECT *
        FROM XMLTABLE('/Results/Users/User'
               PASSING XMLTYPE(BFILENAME('XMLDIR', 'results.xml'),
               NLS_CHARSET_ID('CHAR_CS'))
               COLUMNS USERNAME  NUMBER(4)    PATH 'USERNAME',
                       FIRSTNAME  VARCHAR2(10) PATH 'FIRSTNAME',
                       LASTNAME    NUMBER(7,2)  PATH 'LASTNAME',
                       STATUS  VARCHAR2(14) PATH 'STATUS'
    Regards,
    Sankalp

  • Upload data from excel file to Oracle table

    Dear All,
    I have to upload data from excel file to Oracle table without using third party tools and without converting into CSV file.
    Could you tell me please how can i do this using PLSQl or SQL Loader.
    Thnaks in Advance..

    Dear All,
    I have to upload data from excel file to
    Oracle table without using third party tools and
    without converting into CSV file.
    Could you tell me please how can i do this
    using PLSQl or SQL Loader.
    Thnaks in Advance..As billy mentioned using ODBC interface ,the same HS service which is a layer over using traditional ODBC to access non oracle database.Here is link you can hit and trial and come out here if you have any problem.
    http://www.oracle-base.com/articles/9i/HSGenericConnectivity9i.php[pre]
    Khurram                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Error Loading Data into a flat file

    I am recieving the following error when loading data into a flat file from a flat file. SQL 2005 is my back end DB. If I cut the file iin half approx 500K rows my ODI interface works fine. Not sure what to look at.. I rebuit the interface which before was just dying giving no error and now I am getting this.
    Thanks
    java.lang.Exception
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.i(e.java)
         at com.sunopsis.dwg.cmd.g.y(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Unknown Source)

    Figured it out, found similar post that stated changing the HEAP size
    Increase the page size in odiparams.bat in the bin folder and restart Designer.
    For eg:
    set ODI_INIT_HEAP=128m
    set ODI_MAX_HEAP=1024m

  • Va31 shedule line agreement data upload from flat file

    Hi abapers
    I have to upload some data (va31) from flat file to my database (shedule line agreement data) I am using user exit for it...Cant get which user exit will solve the purpose and where to check it from..I tried using SDTRM001 , meeta001 and and the va45A series but its not working. I used break point on these user exits but its not stoping at break point.
    Can any one help me where to find which user exit will work in this case?
    Thanks in Advance
    Annu

    Hi Prash,
    Check these posts:
    Re: Increasing the length of Infoobject from 60 to 240 characters
    Re: InfoObject > 60
    Bye
    Dinesh

  • OWB - Flat file to oracle table

    Second message, please read.
    OS- Microsoft windows 2000 5.00.2195 Service Pack 2
    OWB client---9.0.3.33.0
    OWB Repository--9.0.3.0.1
    Database--oracle 9i Enterprise Edition 9.0.1.3.1 with the partioning option Jserver Release9.0.1.3.0
    OEM--9.0.1.0.0
    I have created mapping between the source(flat file)and target(oracle)using Oracle Warehouse Builder. Mapping was validated, configured and it successfully generated without errors. The ‘Deploy’ button and the ‘Run’ button are disabled. How can I run/deploy this mapping ?
    The above OWB copy was downloaded from the Oracle corp website. Is this version an evaluation copy? Alternatively Is this a beta copy ?
    Please help.

    Dear All,
    I have a problem with loading flat files to oracle tables using OWB 9.2
    i created a map with my flat file as a source and my oracle table as a target,and i created a connector between the target location and the flat file location.And i deployed the connector and registered the flat file location using my PC information and the path of the files on my pc.
    I generated the map and saved the .ctl file and deployed the map,and hence trying to load the ctl file using the sql loader as the following:
    C:\Documents and Settings\CORAL 2000>sqlldr owb_rt_rep/owb_rt_rep@ofsa
    control = D:\oracle2\ofsa\owb\codegen\BM_DEBIT_CARDS_DAT_MAP.ctl
    ---where owb_rt_rep is my runtime repository user.
    I got the following error:
    SQL*Loader-350: Syntax error at line 18.
    Expecting "(", found ".".
    INTO TABLE "{{TRG_LOC1.Schema}}"."BM_DEBIT_CARDS_DAT"
    --where trg_loc1 is my target location and bm_debit_cards_dat is my target table.
    I tried to grant from the target schema the privelages to the runtime user incase its the problem,but still it didn't work.
    Any ideas??
    Dina Nagia
    Message was edited by:
    Dina Nagia

  • Map FLAT file to oracle table using 9.04 version - PLS HELP!!!!

    Hello all
    I am having a problem with mapping a flat file to oracle table. The validation is successful, when I go to Project/Deployment manager. Try to deploy the mapping itself and the target table. It said succesful, and the last step is another "Deploy", this one is fail. Saying could not locate the file (which is a flat file) , but it is there on the server.
    I have read all the help on line and follow what they show me, but still not work
    Any ideas? Please provide detail answer if you know it.
    Thank in advance

    Hallo,
    just give a rights on connector
    Variant 1
    1. connect to user sys
    2. grant read,write on directory <connector_name> to <target_schema>;
    or
    Variant 2
    1. as user sys or system give CREATE_ANY_DIRECTORY to <target_schema>
    2. manualy make CREATE DIRECTORY <connector_name> as '<full_path_to_directory>';
    and enjoy :)
    PS: <connector_name> you can take from script CREATE_TABLE wisch in Generation phase was created!
    Kirill

  • Conversion of fixed length flat files to oracle table

    hello friends
    Please help me getting the code for conversion of fixed length flat files to oracle table
    Should the tables be pre-defined ?????
    In this case the de-limiters are variable length spaces and not commas.Please help me with the same
    Regards,
    -Mahesh

    You can use SQL*Loader to load fixed-width files into Oracle. Instructions on writing appropriate control files are in the Oracle Utilities manual
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96652/ch03.htm#1004687
    You can also use external tables, assuming you're using 9i or later (the syntax for external table definitions is nearly identical to the syntax for SQL*Loader control files).
    You'll need to create a table definition in Oracle. You can either create a "normal" table and use SQL*Loader to populate it or you can create an external table definition.
    Justin

  • Issue in loading specific columns from a file to teradata table using IKM

    Hi,
    Can any one help to resolve the issue in loading specific columns from text file to teradata table.
    i tried using IKM file teradata and columns are getting displaced.
    my requirement suppose i have 5 columns in file and i have to load only 3columns to table using IKM.
    same thing can be achived using LKM file to teradata but i want use IKM.
    please suggest me on this
    Regards
    Vinod

    Hi,
    I believe that the problem you are having is that you have a delimited file, of which you want to pick columns from position 2,3,5. In this case, ODI will pick the first 3 columns of a delimited file regardless of position.
    For example, if you a tab delimited file with c1,c2,c3,c4,c5 columns, and you want only columns c2,c3,c5 - when mapping these in an ODI interface, and executing, you will actually pick up the data from c1,c2,c3 as these are the first three columns in the file (reading from left to right). You can ignore "columns" on the right hand side of a file, but not the left. E.g delimited file with c1,c2,c3,c4,c5. Only pick columns c1,c2 will give you data for the first 2 columns
    Create a temporary table to load all the data from the file, and use you temp table to extract the data you require. Or you could get the file created with the first three columns as the columns you require.
    Cheers
    Bos
    Edited by: Bos on Jan 18, 2011 1:06 PM

Maybe you are looking for

  • Magsafe charger issue

    I noticed that when my laptop is charging and if I wiggle a little near the base of magsafe connector it would stop charging (red light turns off) but comes back to charge again when I stopped doing that. Is the wire connection lose inside? I got the

  • My phone number is not showing in imessage

    Hi, My GSM number is not showing in any of the imessage settings, nor is there any option to add it. i havr triedd the below from various other threads i have seen on here: 1. Reset network 2. Remove ID from facetime / imessage / icloud / appstore 3.

  • Print request data to System.out?

    Hi, I am trying to print out the contents of the request object in a Servlet to System.out for testing purposes. I am doing it as shown below but not getting any output, does this code look correct? ServletInputStream in = request.getInputStream(); i

  • Xspf player installation- help needed DESPERATELY

    I've been trying for over 2 months to install the xspf player on my iWeb site. This is the URL: http://www.innerspheresmusic.com/Audio_4.html which shows what I haven't managed ! I just checked on a Windows PC and the page is blank- not even a blue r

  • How to upgrade iphone 3gs ios3.1 to ios4.1/4.3

    I have been trying to upgrade my iphone 3gs recently.. Unfortunately Itune keeps popping up the message box and stated that "There was a problem downloading the software for the iphone. The network connection timed out", It also required me to make s