Error in Loading a clob via external table (Oracle 10.2.0.3 On Solaris 8)

Hi,
I am trying to insert a csv file as a single record as a CLOB (one row for entire csv file) and trying to do that via external table. But unalbe to do so. Following is the syntax I tried with:
create table testext_tab2
  ( file_data clob
  organization external
     TYPE ORACLE_LOADER
     DEFAULT DIRECTORY dir_n1
  access parameters
         RECORDS DELIMITED BY NEWLINE
           BADFILE DIR_N1:'lob_tab_%a_%p.bad'
             LOGFILE DIR_N1:'lob_tab_%a_%p.log'
             FIELDS TERMINATED BY ','
          MISSING FIELD VALUES ARE NULL
  clob_filename CHAR(100)
  COLUMN TRANSFORMS  (file_data FROM LOBFILE (clob_filename) FROM (DIR_N1) CLOB)
  LOCATION ('emp.txt')
REJECT LIMIT UNLIMITED
--it gives the output that the table is created but the table does not have any rows (select count(*) from testext_tab2 gives 0 rows)
-- and the logfile has entries like follows:
  Fields in Data Source:
    CLOB_FILENAME                   CHAR (100)
      Terminated by ","
      Trim whitespace same as SQL Loader
  Column Transformations
    FILE_DATA
        is set from a LOBFILE
            directory is from constant DIR_N1
                directory object list is ignored
            file is from field CLOB_FILENAME
            file contains character data
                in character set WE8ISO8859P1
KUP-04001: error opening file /oracle/dba/dir_n1/7369
KUP-04017: OS message: No such file or directory
KUP-04065: error processing LOBFILE for field FILE_DATA
KUP-04101: record 1 rejected in file /oracle/dba/dir_n1/emp.txt
KUP-04001: error opening file /oracle/dba/dir_n1/7499
KUP-04017: OS message: No such file or directory
KUP-04065: error processing LOBFILE for field FILE_DATA
KUP-04101: record 2 rejected in file /oracle/dba/dir_n1/emp.txt
KUP-04001: error opening file /oracle/dba/dir_n1/7521
KUP-04017: OS message: No such file or directory
KUP-04065: error processing LOBFILE for field FILE_DATA
KUP-04101: record 3 rejected in file /oracle/dba/dir_n1/emp.txt
and also the file to be loaded (emp.txt) has data like this:
7369,SMITH,CLERK,7902,12/17/1980,800,null,20
7499,ALLEN,SALESMAN,7698,2/20/1981,1600,300,30
7521,WARD,SALESMAN,7698,2/22/1981,1250,500,30
7566,JONES,MANAGER,7839,4/2/1981,2975,null,20
7654,MARTIN,SALESMAN,7698,9/28/1981,1250,1400,30
7698,BLAKE,MANAGER,7839,5/1/1981,2850,null,30
7782,CLARK,MANAGER,7839,6/9/1981,2450,null,10
7788,SCOTT,ANALYST,7566,12/9/1982,3000,null,20
7839,KING,PRESIDENT,null,11/17/1981,5000,null,10
7844,TURNER,SALESMAN,7698,9/8/1981,1500,0,30
7876,ADAMS,CLERK,7788,1/12/1983,1100,null,20
7900,JAMES,CLERK,7698,12/3/1981,950,null,30
7902,FORD,ANALYST,7566,12/3/1981,3000,null,20
7934,MILLER,CLERK,7782,1/23/1982,1300,null,10I will be thankful for help on this. Also I read on asktom site (http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1669379500346411993)
that LOB are not supported for external tables but there are other sites with examples of CLOB being loaded by external tables.
With regards,
Orausern

CMcM wrote:
Hi all
We have an application that runs fine on 10.2.0.4 on most platforms, but a customer has reported an error when running 10.2.0.3 on HP. We have since reproduced the error on 10.2.0.3 on XP but have failed to reproduce it on Solaris or Linux.
The exact error is within a set of procedures, but the simplest reproducible form of the error is pasted in below.Except that you haven't pasted output to show us what the actual error is. Are we supposed to guess?
SQL> select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
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
SQL> ed
Wrote file afiedt.buf
  1  declare
  2    vstrg clob:= 'A';
  3    Thisstrg varchar2(32000);
  4  begin
  5    for i in 1..31999 loop
  6      vstrg := vstrg||'A';
  7    end loop;
  8    ThisStrg := vStrg;
  9* end;
SQL> /
PL/SQL procedure successfully completed.
SQL>Works ok for me on 10.2.0.1 (Windows 2003 server)

Similar Messages

  • Error 'Loading Textfile data into external table'

    I am using Apex 2.0, Oralce Database 10G and Internet Explorer (version 6.5)
    I tried to run following code using SQLCommands of SQLWORKSHOP of Apex
    Code Here:
    declare
    ddl1 varchar2(200);
    ddl2 varchar2(4000);
    begin
    ddl1 := 'create or replace directory data_dir as
    ''C:\LAUSD_DATA\''';
    execute immediate ddl1;
    ddl2:= 'create table tbl_temp_autoload
    (ID NUMBER,
         RECTYPE VARCHAR2(2),
         EXPORTNBR NUMBER(2),
         EXPORTDATE DATE,
         BIMAGEID VARCHAR2(11),
         APPLICNBR NUMBER(10),
         MEALIMAGE VARCHAR2(17),
         MEDIIMAGE VARCHAR2(17),
         LANGUAGE VARCHAR2(1),
         APPLICCNT NUMBER(1),
         OTHAPPLICNBR VARCHAR2(10),
         PEDETDATE DATE,
         PESTATUS VARCHAR2(1),
         ERRORREMARKS VARCHAR2(50),
         COMMENTS VARCHAR2(50),
         SID1 VARCHAR2(10),
         WID1 NUMBER(10),
         MEDIROW1 VARCHAR2(1),
         LASTNAME1 VARCHAR2(20),
         FIRSTNAME1 VARCHAR2(20),
         SCHOOL1 VARCHAR2(15),
         LOCCD1 VARCHAR2(4),
         BIRTHDATE1 DATE,
         CASENBR1 VARCHAR2(15),
         FOSTER1 VARCHAR2(1),
         CHILDINC1 VARCHAR2(4),
         RACEAIAN VARCHAR2(1),
         RACEBAA VARCHAR2(1),
         RACENHPI VARCHAR2(1),
         RACEASIAN VARCHAR2(1),
         RACEWHITE VARCHAR2(1),
         HISPANIC VARCHAR2(1),
         NOTHISPANIC VARCHAR2(1),
         ADULTSIG3 VARCHAR2(1),
         ADULTSIGDATE3 VARCHAR2(10),
         ADULTNAME3 VARCHAR2(30),
         SSN3 VARCHAR2(1),
         SSN3NOT VARCHAR2(1),
         ADDRESS VARCHAR2(30),
         APTNBR VARCHAR2(6),
         CTY VARCHAR2(20),
         ZIP NUMBER(5),
         PHONEHOME VARCHAR2(12),
         PHONEWORK VARCHAR2(12),
         PHONEEXTEN VARCHAR2(6),
         MEALROWA VARCHAR2(1),
         LNAMEA VARCHAR2(20),
         FNAMEA VARCHAR2(20),
         MINITA VARCHAR2(6),
         GENDERA VARCHAR2(1),
         AGEA NUMBER(2),
         MOTYPEA VARCHAR2(1),
         MONAMEA VARCHAR2(1),
         FATYPEA VARCHAR2(1),
         FANAMEA VARCHAR2(1),
         FAMNBR NUMBER(1),
         PARENTINC NUMBER(5),
         FAMILYINC NUMBER(5),
         FAMILYSIZE NUMBER(2),
         PGSIG1 VARCHAR2(1),
         PGNAME1 VARCHAR2(30),
         PGSIGDATE1 VARCHAR2(10),
         FAMSIZE1 VARCHAR2(2),
         FAMINC1 VARCHAR2(6),
         PGSIG2 VARCHAR2(1),
         PGNAME2 VARCHAR2(30),
         PGSIGDATE2 DATE,
         FAMSIZE2 VARCHAR2(2),
         FAMINC2 VARCHAR2(4),
         GRADE NUMBER(2),
         SCHOOL VARCHAR2(40),
         RACE VARCHAR2(4),
         MEDI_CALID VARCHAR2(15),
         MEDSTATUS VARCHAR2(1),
         ADULT1NAME VARCHAR2(40),
         ADULT1TYPE VARCHAR2(1),
         ADULT1INC1 VARCHAR2(5),
         ADULT1INC2 VARCHAR2(5),
         ADULT1INC3 VARCHAR2(5),
         ADULT1INC4 VARCHAR2(5),
         ADULT2NAME VARCHAR2(40),
         ADULT2TYPE VARCHAR2(1),
         ADULT2INC1 VARCHAR2(5),
         ADULT2INC2 VARCHAR2(5),
         ADULT2INC3 VARCHAR2(5),
         ADULT2INC4 VARCHAR2(5),
         ADULT3NAME VARCHAR2(40),
         ADULT3TYPE VARCHAR2(1),
         ADULT3INC1 VARCHAR2(5),
         ADULT3INC2 VARCHAR2(5),
         ADULT3INC3 VARCHAR2(5),
         ADULT3INC4 VARCHAR2(5),
         ADULT4NAME VARCHAR2(40),
         ADULT4TYPE VARCHAR2(1),
         ADULT4INC1 VARCHAR2(5),
         ADULT4INC2 VARCHAR2(5),
         ADULT4INC3 VARCHAR2(5),
         ADULT4INC4 VARCHAR2(5),
         ADULT5NAME VARCHAR2(40),
         ADULT5TYPE VARCHAR2(1),
         ADULT5INC1 VARCHAR2(5),
         ADULT5INC2 VARCHAR2(5),
         ADULT5INC3 VARCHAR2(5),
         ADULT5INC4 VARCHAR2(5),
         ADULT6NAME VARCHAR2(40),
         ADULT6TYPE VARCHAR2(1),
         ADULT6INC1 VARCHAR2(5),
         ADULT6INC2 VARCHAR2(5),
         ADULT6INC3 VARCHAR2(5),
         ADULT6INC4 VARCHAR2(5),
         AGE1LT19 VARCHAR2(1),
         AGE2LT19 VARCHAR2(1),
         AGE3LT19 VARCHAR2(1),
         AGE4LT19 VARCHAR2(1),
         AGE5LT19 VARCHAR2(1),
         AGE6LT19 VARCHAR2(1),
         MIDINIT1 VARCHAR2(1)
    organization external
    ( type oracle_loader
    default directory data_dir
    access parameters
    ( fields terminated by '','' )
    location (''DataJuly07.txt'')
    execute immediate ddl2;
    end;
    Error Received:
    ORA-29913:error in executing ODCIEXITTABLEFETCH callout ORA-30653: reject limit reached
    Please help ASAP. I am new with oracle and Apex. Any help will be appreciated greatly.

    I downloaded the External table simple application from the Apex Packaged application and installed it. It installed successfully but when I run it - it doesn't load the data eventhough I get a message stating it was successful. I am running it on OracleXE - Apex 3.0.1.
    In addition, I tried running the stored procedure directly (ext_employees_load) in sql-developer and received the ora-30648.
    Please help.
    thanks,
    Tom

  • How to ''give'' error for this case of an EXTERNAL TABLE?

    Our external table routine works fine:
    -- We have a csv file with 2 cols.
    -- When we create the table referring the csv it works fine.
    -- Even if the csv has more the 2 cols, the ET command only takes the 2 cols and it works fine.
    -- Now, users are saying that if the csv has more than 2 cols, the ET command should give an error
    I went through the command but cannot find any clause which will do this.
    Is there any other way or workaround?
    CREATE TABLE <table_name> (
    <column_definitions>)
    ORGANIZATION EXTERNAL
    (TYPE oracle_loader
    DEFAULT DIRECTORY <oracle_directory_object_name>
    ACCESS PARAMETERS (
    RECORDS DELIMITED BY newline
    BADFILE <file_name>
    DISCARDFILE <file_name>
    LOGFILE <file_name>
    [READSIZE <bytes>]
    [SKIP <number_of_rows>
    FIELDS TERMINATED BY '<terminator>'
    REJECT ROWS WITH ALL NULL FIELDS
    MISSING FIELD VALUES ARE NULL
    (<column_name_list>))\
    LOCATION ('<file_name>'))
    [PARALLEL]
    REJECT LIMIT <UNLIMITED | integer>;
    Is it possible to use the READSIZE?
    Edited by: Channa on Sep 23, 2010 2:28 AM

    -- Now, users are saying that if the csv has more than 2 cols, the ET command should give an error
    I went through the command but cannot find any clause which will do this.
    Is there any other way or workaround?I looked at Serverprocess' sql*loader script and did not see how that would answer your question - how to raise an error if the file has more than 2 columns. If I missed something can Serverprocess explain?
    I can't think of a direct way to do this with your external table either, but there may be indirect ways. Some brainstorming ideas of perhaps dubious usefulness follow.
    Placing a view over the external table can limit results to the first two columns but won't raise an error.
    A pipelined function can read the external table, check for data where there shouldn't be any, and raise an exception when you find data in columns where there should not be any.
    Similarly, you could ditch the external table and use utl_file to read the file, manually parsing and checking the data. LOTS more work but more control on your end. External tables are much easer to use :(
    Or, first load the external table into a work table before the "real" select. Check the work table for the offending data programatically and raise an error if data is where it should not be. You could keep the existing external table and not have to do a lot of recoding.
    Or, also load the data into an otherwise unneeded global temporary table first. Use a trigger on the load to look for the unwanted data and raise an error if offending data is there
    These ideas are boiling down to variations on validating the data before you use it.
    Good luck!

  • ORA-22275 :invalid LOB locator specified error while loading BLOBs/CLOBS.

    Hello All,
    I am trying to load BLOB/CLOB data from a client oracle DB to the oracle db on our side,we are using ODI version 10.1.3.5.6,which reportedly has the issue of loading BLOB/CLOBS solved.I am using
    The extraction fails in the loading stage when inserting data into the C$ table with the following error.
    "22275:99999 :java.sql.BatchUpdateException:ORA-22275:Invalid LOB locator specified".
    Kindly let me know how I can resolve this issue as the requirement to load this data is very urgent.
    Thanks,
    John

    One alternate way can be done out of ODI as ODI is still not able to resolve this issue. You can trim these fields (CLOB/BLOB) and push this data as separate fields into ODI and at the reporting end you can again concatenate them.
    May be this may solve your problem ....it solved mine.
    --XAT                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Errors while loading Product master via HCI

    Hello Experts,
    We have been facing some issue while loading the product master via the HCI. Here is the reason taken from the log file:
    REJECTION_CODE
    REJECTION_CODE_NAME
    REJECTION_DESCRIPTION
    140
    Inappropriate use of special character
    Special characters are not allowed
    We took the same records and loaded through the flat file and they were successful and can be seen in excel ui
    We also checked for any inappropriate characters which are not allowed but we couldn't find any.
    How should we load the data via the HCI with no errors?
    Any help would be highly appreciated.
    Thanks
    Karan

    YS
    We are also just getting the same error message as Karan.  This issue, for Kraft, just started this week.   We looked at the SAP note that you poated and it does not help as it tells us to add code to remove special characters.  There are none in the source table in ECC.
    The issue is that we have made no changes and this error has started to hit us.
    We upgraded to Patch 7 of the HCI Agent this pas weekend.  Is that a possible driver of this issue?
    -Jeff

  • Error while loading Flat file to the table (ORA-00936: missing expression)

    lat file Hi Gurus
    Receiving the following error while trying to load of flat file to the database :
    ODI-1228: Task test_file_load (Integration) fails on the target ORACLE connection DEMO_STAGE.
    Caused By: java.sql.SQLSyntaxErrorException: ORA-00936: missing expression
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:457)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
         at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:889)
         at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:476)
         at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:204)
         at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:540)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:217)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1079)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1466)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3752)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3937)
         at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1535)
         at oracle.odi.runtime.agent.execution.sql.SQLCommand.execute(SQLCommand.java:163)
         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.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2906)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2609)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:537)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:453)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1740)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:338)
         at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:214)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:272)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:263)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:822)
         at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:123)
         at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
         at java.lang.Thread.run(Thread.java:662)
    The file which I have tried to load is : SRC_SALES_PERSON and teh table structure is
    CREATE table "TRG_SALES_PERSON"(
    "SALES_PERSON_ID" NUMBER(8,0) NOT NULL,
    "FIRST_NAME" VARCHAR2(80),
    "LAST_NAME" VARCHAR2(80),
    "DATE_HIRED" VARCHAR2(80),
    "DATE_UPDATED" DATE NOT NULL)
    Knowledge module used are
    LKM File to SQL
    IKM SQL Incremental Update
    We rae using ODI 11g R2 ...
    Thanks and reallty appreciate any help in thsi regard.

    HI there,
    I am facing the same issue while loading data from SRC_SALES_PERSON(flat file) to TRG_CUSTOMER.
    I dont see any errors in the steps however the data is not laoded finally. Here are the sql commands
    **On source**
    select     ID     C11_ID,
         LASTNAME     C9_LASTNAME
    from      TABLE
    /*$$SNPS_START_KEYSNP$CRDWG_TABLESNP$CRTABLE_NAME=SRC_SALES_PERSONSNP$CRLOAD_FILE=D:\Pratima\Softwares\ODI\ofm_odi_companion_generic_11.1.1.5.1_disk1_1of1[1]\demo\oracledi-demo\oracledi\demo\file/SRC_SALES_PERSON.txtSNP$CRFILE_FORMAT=FSNP$CRFILE_SEP_FIELD=0x0009SNP$CRFILE_SEP_LINE=0x000D0x000ASNP$CRFILE_FIRST_ROW=0SNP$CRFILE_ENC_FIELD=SNP$CRFILE_DEC_SEP=SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=IDSNP$CRTYPE_NAME=STRINGSNP$CRORDER=1SNP$CRLINE_OFFSET=1SNP$CRLENGTH=11SNP$CRPRECISION=11SNP$CRACTION_ON_ERROR=0SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=FIRSTNAMESNP$CRTYPE_NAME=STRINGSNP$CRLINE_OFFSET=12SNP$CRLENGTH=50SNP$CRPRECISION=50SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=LASTNAMESNP$CRTYPE_NAME=STRINGSNP$CRLINE_OFFSET=62SNP$CRLENGTH=50SNP$CRPRECISION=50SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=DATE1SNP$CRTYPE_NAME=STRINGSNP$CRLINE_OFFSET=112SNP$CRLENGTH=20SNP$CRPRECISION=20SNP$CR$$SNPS_END_KEY*/
    On Target
    insert into STAGING.C$_0TRG_CUSTOMER
         C11_ID,
         C9_LASTNAME
    values
         :C11_ID,
         :C9_LASTNAME
    The actual code at source fails however the step is in green.
    Thanks in Advance,
    Pratima

  • External Tables (Oracle Loader)

    Hi While creating the external Table, i am getting error.
    ORA-12899: value too large for column PRC_REC_TYPE (actual: 2, maximum: 1)
    But while checking the CSV file, i found that prc_rec_type is having one 1 length value.
    -- Create table
    create table ET_PGIT_POL_RISK_COVER
    prc_pol_no VARCHAR2(60),
    prc_end_no_idx VARCHAR2(22),
    prc_sec_code VARCHAR2(12),
    prc_risk_id VARCHAR2(12),
    prc_smi_code VARCHAR2(12),
    prc_code VARCHAR2(12),
    prc_desc VARCHAR2(2000),
    prc_rate VARCHAR2(22),
    prc_rate_per VARCHAR2(22),
    prc_cvr_type VARCHAR2(1),
    prc_add_si_yn VARCHAR2(1),
    prc_si_curr_code VARCHAR2(12),
    prc_prem_curr_code VARCHAR2(12),
    prc_si_fc VARCHAR2(22),
    prc_si_lc_1 VARCHAR2(22),
    prc_si_lc_2 VARCHAR2(22),
    prc_si_lc_3 VARCHAR2(22),
    prc_prem_fc VARCHAR2(22),
    prc_prem_lc_1 VARCHAR2(22),
    prc_prem_lc_2 VARCHAR2(22),
    prc_prem_lc_3 VARCHAR2(22),
    prc_eff_fm_dt VARCHAR2(30),
    prc_eff_to_dt VARCHAR2(30),
    prc_brok_comm_appl_yn VARCHAR2(1),
    prc_no_clm_bonus_appl_yn VARCHAR2(1),
    prc_prof_comm_appl_yn VARCHAR2(1),
    prc_cr_uid VARCHAR2(12),
    prc_rate_eft VARCHAR2(12),
    prc_terrorism_yn VARCHAR2(1),
    prc_lvl VARCHAR2(12),
    prc_tot_si_fc VARCHAR2(22),
    prc_first_loss_perc VARCHAR2(22),
    prc_flxi_risk_cover_desc VARCHAR2(2000),
    prc_rec_type VARCHAR2(1)
    organization external
    type ORACLE_LOADER
    default directory MMI_DATA_MIG
    access parameters
    RECORDS DELIMITED BY NEWLINE BADFILE 'ET_PGIT_POL_RISK_COVER.Bad' LOGFILE 'ET_PGIT_POL_RISK_COVER.Log' FIELDS TERMINATED BY ',' MISSING FIELD VALUES ARE NULL REJECT ROWS WITH ALL NULL FIELDS
    location (MMI_DATA_MIG:'COVER_1.csv')
    reject limit UNLIMITED;
    Not able to upload the file here.

    CHANDAN,0,1001,1,,1004,TPPropertyDamage,2.00000,100.00000,C,0,001,001,10000.000,10000.000,10000.000,10000.000,200.000,200.000,200.000,200.000,14-Feb-13 11:10:39,13-Feb-14 23:59:00,1,0,0,MMI,,0,F,0.000,,,N
    CHANDAN,0,1001,1,,1005,RoadSideAssistance,1.50000,100.00000,C,0,001,001,15000.000,15000.000,15000.000,15000.000,225.000,225.000,225.000,225.000,14-Feb-13 11:10:39,13-Feb-14 23:59:00,1,0,0,MMI,,0,F,0.000,,,N
    There are Actually three rows in csv.Above 2 rows are not inserted into et table whereas last row is getting inserted into et table(Below one)
    CHANDAN,0,1001,1,,1099,SASRIA,0.25000,1.00000,C,0,001,001,12500.000,12500.000,12500.000,12500.000,0.250,0.250,0.250,0.250,14-Feb-13 11:10:39,13-Feb-14 23:59:00,0,0,0,MMI,,0,F,0.000,,,N

  • Execution Errors while running a mapping having external table operator

    when I am executing a mapping with external table operator, I am getting the following error:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout ORA-29400: data cartridge error KUP-04040: file testdoc.txt in CONN_FLAT_FILE not found
    Here CONN_FLAT_FILE is the connector.
    The flat file location has been registered with the user name (as used for Windows login), password (as used for Windows Login) and host name as the name that is used for accessing my machine in the network. The path to the file name is given from the root folder like C:\.....
    Please let me know things that I need to check.
    Regards

    If you're using an external table check if you can see the data by querying that table. Possible errors: wrong directory or wrong file structure.
    Regards,
    Jörg

  • Loading xml file into external tables

    emp.xml is xml file namewhich is saved in C:\Documents and Settings\james\Desktop\emp.xml
    xml file
    <EMPLOYEES>
    <EMP>
    <EMPNO>7369</EMPNO>
    <ENAME>SMITH</ENAME>
    <JOB>CLERK</JOB>
    <HIREDATE>17-DEC-80</HIREDATE>
    <SAL>800</SAL>
    </EMP>
    <EMP>
    <EMPNO>7499</EMPNO>
    <ENAME>ALLEN</ENAME>
    <JOB>SALESMAN</JOB>
    <HIREDATE>20-FEB-81</HIREDATE>
    <SAL>1600</SAL>
    <COMM>300</COMM>
    </EMP>
    </EMPLOYEES>
    CREATE DIRECTORY my_xml_dir AS 'C:\Documents and Settings\james\Desktop\emp.xml'
    CREATE TABLE my_xml_et ( EMPNO NUMBER, EMPNAME VARCHAR2(10), JOB VARCHAR2(10), HIREDATE DATE, SAL NUMBER )
    using external tables how this xml data is loaded into my_xml_et

    http://download-west.oracle.com/docs/cd/B13789_01/appdev.101/b10790/toc.htm
    Take a look at Examples 4-8 and 4-9. Even thought this is 10g doc code should work on 9.2.4 or later

  • ORA-0092 error when trying to create an external table

    For some reason, I always received the following error whenever I attempt to create an
    External table.
    ORA-0092:missing or invalid option
    This is the code that I am using in SQL Plus:
    SQL> create table products (
    2 product_no number,
    3 description varchar2(100),
    4 price varchar2(20)
    5 )
    6 organization EXTERNAL (
    7 type oracle_loader
    8 default directory PRODUCT_DIR
    9 access parameters
    10 ( records delimited by newline
    11 badfile 'products.bad'
    12 logfile 'products.log'
    13 fields terminated by ','
    14 )
    15 location ('products.csv')
    16 )
    17 reject ('products.csv')
    18 )
    19 reject limit unlimited
    20 /
    organization EXTERNAL (
    ERROR at line 6:
    ORA-00922: missing or invalid option
    This is the statement that I used to create my directory:
    CREATE DIRECTORY PRODUCT_DIR AS 'd:\products';
    Does that directory have to be an actual physical directory in UNIX for this to work, or
    will it be looking for a products folder in the d drive of my Windows NT machine?

    The directory should exist on the server where Oracle is installed. Since clients can be more than one on various operating
    systems, It can not be a directory on the client (since that would not be valid for other clients or even the same user
    connecting from a different machine).
    Did you install the Standard Edition of Oracle or the Enterprise Edition of Oracle server on your machine?
    External Tables option may not be available on Standard Edition.
    I have Oracle9i Rel 2 installed on my server and the external tables works fine for me.

  • Syntax error while loading hierarchy from an external file

    Dear Expert:
    I am new to BW and I met a problem today while loading hierarchy from an external file. Actually I am following below article to load the hierarchy:
    /people/prakash.bagali/blog/2006/02/07/hierarchy-upload-from-flat-files
    When I schedule the infopackage, the error message says: "Syntax error in template RSTMPL9C, ROW 76". Actually there is only around 20 lines of records.
    Since I am not familiar with hierarchy load, so:
    1. while loading from external file, do I need to create one hierarchy in advance  through "Maintain Hierarchies" in the infoobject? My understanding is since I can load that hierarchy from file, so I do not need to create one in advance, once the load completed, the hierarchy should automatically generated there. Is my understanding correct?
    2. Before loading the hierarchy, do I need to load the master data of external characteristics in the hierarchy first? Here in my example, the sales hierarchy has 2 external characteritics (Country and region) in the hierarchy. Do I need to load some data first?
    3. My 'Preview' function in the infopackage is gray so that I can not test the data loading. Why is it gray?
    Information like file name, file dir, file type(csv), seperator should be correct there.
    Can anybody help me take a look into that? Many thanks for your time in advance!
    Tim

    Hi ctsiszidane:
    There are some other SAP Notes that can help you solve the problem.  Depending on your Support Package level check which of them is applicable.
    Note 659461 - RSAR 682: Syntax error in template RSTMPL9A, row 246
    Note 605690 - Escape characters are not processed correctly
    Note 620152 - Syntax error in RSTMPL9A during data loading from a file
    Regards,
    Francisco Milán.

  • Error while loading data from flat file to Oracle DB

    I am new to ODI. I am trying to load data from a flat file to Oracle DB using the LKM File to Oracle (External Table) and using the IKM Oracle Incremental Update. I am getting the following exception during the "Create External Table" stage:
    org.apache.bsf.BSFException: exception from Jython:
    Traceback (most recent call last):
      File "<string>", line 44, in <module>
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:462)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
      at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:931)
      at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:481)
      at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:205)
      at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:548)
      at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:202)
      at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:1110)
      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1488)
      at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:2251)
      at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:2192)
      at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:347)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
    java.sql.SQLException: java.sql.SQLException: ORA-30088: datetime/interval precision is out of range
      at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)
      at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.execInBSFEngine(SnpScriptingInterpretor.java:322)
      at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.exec(SnpScriptingInterpretor.java:170)
      at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java:2473)
      at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:48)
      at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:1)
      at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
      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:561)
      at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:464)
      at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)
      at 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)
      at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:292)
      at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:855)
      at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
      at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:83)
      at java.lang.Thread.run(Thread.java:662)
    Caused by: Traceback (most recent call last):
      File "<string>", line 44, in <module>
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:462)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
      at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:931)
      at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:481)
      at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:205)
      at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:548)
      at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:202)
      at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:1110)
      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1488)
      at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:2251)
      at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:2192)
      at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:347)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
    java.sql.SQLException: java.sql.SQLException: ORA-30088: datetime/interval precision is out of range
      at org.python.core.PyException.fillInStackTrace(PyException.java:70)
      at java.lang.Throwable.<init>(Throwable.java:181)
      at java.lang.Exception.<init>(Exception.java:29)
      at java.lang.RuntimeException.<init>(RuntimeException.java:32)
      at org.python.core.PyException.<init>(PyException.java:46)
      at org.python.core.PyException.<init>(PyException.java:43)
      at org.python.core.Py.JavaError(Py.java:455)
      at org.python.core.Py.JavaError(Py.java:448)
      at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:177)
      at org.python.core.PyObject.__call__(PyObject.java:355)
      at org.python.core.PyMethod.__call__(PyMethod.java:215)
      at org.python.core.PyMethod.instancemethod___call__(PyMethod.java:221)
      at org.python.core.PyMethod.__call__(PyMethod.java:206)
      at org.python.core.PyObject.__call__(PyObject.java:397)
      at org.python.core.PyObject.__call__(PyObject.java:401)
      at org.python.pycode._pyx1.f$0(<string>:50)
      at org.python.pycode._pyx1.call_function(<string>)
      at org.python.core.PyTableCode.call(PyTableCode.java:165)
      at org.python.core.PyCode.call(PyCode.java:18)
      at org.python.core.Py.runCode(Py.java:1204)
      at org.python.core.Py.exec(Py.java:1248)
      at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:172)
      at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:144)
      at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.execInBSFEngine(SnpScriptingInterpretor.java:322)
      at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.exec(SnpScriptingInterpretor.java:170)
      at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java:2472)
      at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:47)
      at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:1)
      at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
      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:558)
      at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:464)
      at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)
      at 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)
      at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:292)
      at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:855)
      at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
      at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
      ... 1 more
    Caused by: java.sql.SQLException: ORA-30088: datetime/interval precision is out of range
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:462)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
      at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:931)
      at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:481)
      at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:205)
      at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:548)
      at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:202)
      at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:1110)
      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1488)
      at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:2251)
      at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:2192)
      at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:347)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:175)
      ... 33 more
    Could anyone please provide any pointers.
    Thanks,
    Srini.

    The code that is executed is as follows:
    createTblCmd = r"""
    create table ODITEMP.C$_0PARTNER
      C1_C1 NUMBER(14),
      C2_C2 VARCHAR2(12),
      C3_C3 VARCHAR2(18),
      C4_C4 NUMBER(7),
      C5_C5 TIMESTAMP(11)
    ORGANIZATION EXTERNAL
      TYPE ORACLE_LOADER
      DEFAULT DIRECTORY dat_dir
      ACCESS PARAMETERS
      RECORDS DELIMITED BY 0x'0D0A'
      CHARACTERSET 'WE8ISO8859P1'
      STRING SIZES ARE IN CHARACTERS
      BADFILE 'partners.txt_%a.bad'
      LOGFILE 'partners.txt_%a.log'
      DISCARDFILE 'partners.txt_%a.dsc'
      SKIP 0
      FIELDS
      MISSING FIELD VALUES ARE NULL
      C1_C1 POSITION(1:14) ,
      C2_C2 POSITION(15:26) ,
      C3_C3 POSITION(27:44) ,
      C4_C4 POSITION(45:51) ,
      C5_C5 POSITION(52:62)
      LOCATION ('partners.txt')
    PARALLEL
    REJECT LIMIT UNLIMITED
    # Create the statement
    myStmt = myCon.createStatement()
    # Execute the trigger creation
    myStmt.execute(createTblCmd)
    myStmt.close()
    myStmt = None
    # Commit, just in case
    myCon.commit()

  • 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

  • Unable to find file error while loading data from text file to Oracle

    Hi,
    I am having a interface where i am loading a data of Text file to Oracle.
    But when i am trying to do this i am getting following error.
    ODI-1227: Task SrcSet0 (Loading) fails on the source FILE connection SAPMM.
    Caused By: java.sql.SQLException: File not found: d:/mdb/#General.get_filename
         at com.sunopsis.jdbc.driver.file.FileResultSet.<init>(FileResultSet.java:160)
         at com.sunopsis.jdbc.driver.file.impl.commands.CommandSelect.execute(CommandSelect.java:57)
         at com.sunopsis.jdbc.driver.file.CommandExecutor.executeCommand(CommandExecutor.java:33)
    SAPMM is connection name.
    I am using get_filename to get the filename and it is fetching correct value as the this variable refreshes in previous step of this interface.
    KM used for loading is File to SQL
    What would be cause of this error?
    Thanks,
    Mahesh

    Hi,
    Did a testing and following are the result
    I have
    A> created package having steps like
    1. Declaration of variable v_filename.
    2. Refreshing variable v_filename.
    3. Execution of Interface which gets the file name from v_filename and load into target table
    Package executes successfully.
    B> created package having steps like
    1. Declaration of variable v_filename.
    2. Refreshing variable v_filename.
    3. Scenario of Interface which gets the file name from v_filename and load into target table
    Package executes with erre as it is not able to find the file
    C> created package having steps like
    1. Declaration of variable v_filename.
    2. Refreshing variable v_filename.
    3. Execution of Interface which gets the file name from v_filename and load into target table
    4. Now create a scenario of the package , use the generated scenario in another package say main_package
    Execution of main_package is successful.
    Thanks,
    Sutirtha

  • Error in accessing data through external table

    Hi,
    I am getting the following error while trying to view data through external table,
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04062: no data source specified
    ORA-06512: at "SYS.ORACLE_LOADER", line 19
    according to this error "KUP-04062: no data source specified", location should be specified and i have specified the location as
    LOCATION (<diectory_name>:' '),
    then also it is giving the same error.
    Please Help!

    I am also got the same error when retrieving the data from external table.
    I resolve this problem, like this:
    1. I imported the flat file(.csv) into repository.
    2. Map that flat file fields to database table cols.
    3. Deployed the mapping using controlcenter, and run the mapping.
    4. if it fails there, i loaded the flatfile data through the command prompt using "sqlldr" statement and control file is our mapping control file.
    5 Then it loaded data into database table sucessfully.
    Thanks.

Maybe you are looking for

  • SOLVED: Getting an Input/Output error when accessing certain files

    My system started failing a few days ago because of sudden Input/Output errors when trying to access certain files. It was running fine until various applications started crashing like for example Pidgin (in retrospect probably because of DBus crashi

  • XML Generated using given DTD

    hi guys , i have to make a java GUI application to generate an xml file. to accomplish this the code must: 1...... ask the user to input the path of the DTD file according to which the xml file will be generated. 2........then it should parse the DTD

  • Downloading files?

    We use RoboHelp to help our users program their own experiments. When did first did this 4 years ago we included the script needed to program an action. We gave them the script and told them to copy and paste into a sample program that we included wi

  • Exchange portlet: MAPI_E_LOGON_FAILED

    Hello,experts~! I've configured Exchange2000 portlet with the oracle document(Installing the Microsoft Exchange 2000 Portlets). Environment: We have two different machines. One has IIS , Oracle9iAS and WinNT. The Other has Exchange Server 2000 and Wi

  • Make Safari bookmark show up like an iPhone app?

    Hi all, Is there a way to make an Safari bookmark show up like an iPhone app? I'd like to set up a screen of just my very favorite bookmarks with their icons being the sites favicon. This would be a lot easier than going into Safari, open, a new page