SQL * Loader加载空记录

时间:2015-07-02 16:05:04

标签: oracle sql-loader

Windows Server 2008 R2 SP1 - 我正在运行SQL * Loader的服务器。 数据库服务器是Oracle 11.2.0.3。

我的分隔符为'^~'。我的CTL文件如下:

LOAD DATA
INFILE 'C:\ECOMMERCE\VFT\Marin\inbound\DSGSiteCatalystPassbackKeywords.csv'
BADFILE 'C:\ECOMMERCE\MFT\NxtGen_Catalog_Int\ErrorFiles\MARIN_DSG_KEYWORDS.bad'
DISCARDFILE 'C:\ECOMMERCE\MFT\NxtGen_Catalog_Int\ErrorFiles\MARIN_DSG_KEYWORDS.dsc'
INTO TABLE "ETL_STAGE"."MARIN_KEYWORD"
APPEND
EVALUATE CHECK_CONSTRAINTS
FIELDS TERMINATED BY '^~'
TRAILING NULLCOLS
(MARIN_KEYWORD_ID CHAR(100000),
  KEYWORD,
  BUSINESS_DATE,
  PUBLISHER,
  ACCOUNT,
  CAMPAIGN,
  AD_GROUP,
  MATCH_TYPE CHAR(100000),
  DESTINATION_URL,
  UNIQUE_ID,
  PUB_ID,
  IMPR,
  CLICKS,
  PUB_COST,
  ATTRIBUTED_CONVERSIONS_CONV,
  CLICK_PATH_CONV,
  LAST_CLICK_CONV,
  EMAIL_SIGNUPS_CONV,
  SCORECARD_SIGNUPS_CONV,
  STORE_LOCATOR_PAGE_CONV
)

完成Bat文件:

sqlldr parfile=C:\ECOMMERCE\MFT\NxtGen_Catalog_Int\See\MARIN_DSG_KEYWORDS.par

Par文件是

Userid=xxxxxxx
control=C:\ECOMMERCE\MFT\NxtGen_Catalog_Int\SQLLoaderScripts\MARIN_DSG_KEYWORDS.ctl
log=C:\ECOMMERCE\MFT\NxtGen_Catalog_Int\LogFiles\MARIN_DSG_KEYWORDS.log
bad=C:\\ECOMMERCE\MFT\NxtGen_Catalog_Int\ErrorFiles\MARIN_DSG_KEYWORDS.bad
skip=10

完整的日志文件是:

SQL*Loader: Release 11.2.0.2.0 - Production on Thu Jul 2 11:25:45 2015

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

Control File:   C:\ECOMMERCE\MFT\NxtGen_Catalog_Int\SQLLoaderScripts\MARIN_DSG_KEYWORDS.ctl
Data File:      C:\ECOMMERCE\VFT\Marin\inbound\DSGSiteCatalystPassbackKeywords.csv
  Bad File:     C:\\ECOMMERCE\MFT\NxtGen_Catalog_Int\ErrorFiles\MARIN_DSG_KEYWORDS.bad
  Discard File: C:\ECOMMERCE\MFT\NxtGen_Catalog_Int\ErrorFiles\MARIN_DSG_KEYWORDS.dsc
(Allow all discards)

Number to load: ALL
Number to skip: 10
Errors allowed: 50
Bind array:     64 rows, maximum of 256000 bytes
Continuation:    none specified
Path used:      Conventional

Table "ETL_STAGE"."MARIN_KEYWORD", loaded from every logical record.
Insert option in effect for this table: APPEND
TRAILING NULLCOLS option in effect

   Column Name                  Position   Len  Term Encl Datatype
------------------------------ ---------- ----- ---- ---- ---------------------
MARIN_KEYWORD_ID                    FIRST *****           CHARACTER           
    Maximum field length is 100000
    Terminator string : '^~'
KEYWORD                              NEXT     *           CHARACTER           
    Terminator string : '^~'
BUSINESS_DATE                        NEXT     *           CHARACTER           
    Terminator string : '^~'
PUBLISHER                            NEXT     *           CHARACTER           
    Terminator string : '^~'
ACCOUNT                              NEXT     *           CHARACTER           
    Terminator string : '^~'
CAMPAIGN                             NEXT     *           CHARACTER           
    Terminator string : '^~'
AD_GROUP                             NEXT     *           CHARACTER           
    Terminator string : '^~'
MATCH_TYPE                           NEXT *****           CHARACTER           
    Maximum field length is 100000
    Terminator string : '^~'
DESTINATION_URL                      NEXT     *           CHARACTER           
    Terminator string : '^~'
UNIQUE_ID                            NEXT     *           CHARACTER           
    Terminator string : '^~'
PUB_ID                               NEXT     *           CHARACTER           
    Terminator string : '^~'
IMPR                                 NEXT     *           CHARACTER           
    Terminator string : '^~'
CLICKS                               NEXT     *           CHARACTER           
    Terminator string : '^~'
PUB_COST                             NEXT     *           CHARACTER           
    Terminator string : '^~'
ATTRIBUTED_CONVERSIONS_CONV          NEXT     *           CHARACTER           
    Terminator string : '^~'
CLICK_PATH_CONV                      NEXT     *           CHARACTER           
    Terminator string : '^~'
LAST_CLICK_CONV                      NEXT     *           CHARACTER           
    Terminator string : '^~'
EMAIL_SIGNUPS_CONV                   NEXT     *           CHARACTER           
    Terminator string : '^~'
SCORECARD_SIGNUPS_CONV               NEXT     *           CHARACTER           
    Terminator string : '^~'
STORE_LOCATOR_PAGE_CONV              NEXT     *           CHARACTER           
    Terminator string : '^~'

value used for ROWS parameter changed from 64 to 1
Record 2: Rejected - Error on table "ETL_STAGE"."MARIN_KEYWORD", column MARIN_KEYWORD_ID.
ORA-12899: value too large for column "ETL_STAGE"."MARIN_KEYWORD"."MARIN_KEYWORD_ID" (actual: 1003, maximum: 1000)

Table "ETL_STAGE"."MARIN_KEYWORD":
  5 Rows successfully loaded.
  1 Row not loaded due to data errors.
  0 Rows not loaded because all WHEN clauses were failed.
  0 Rows not loaded because all fields were null.

Space allocated for bind array:                 204652 bytes(1 rows)
Read   buffer bytes: 1048576

Total logical records skipped:         10
Total logical records read:             6
Total logical records rejected:         1
Total logical records discarded:        0

Run began on Thu Jul 02 11:25:45 2015
Run ended on Thu Jul 02 11:25:46 2015

Elapsed time was:     00:00:00.42
CPU time was:         00:00:00.07

0 个答案:

没有答案