Embulkで増分バルクインサートする際に、incremental_columnsオプションを使っています。
連番でデータが蓄積されるカラム値をincremental_columnsに指定させたいので、特定のカラムを指定するとエラーが発生。
原因は、double型はサポートしていない。との事
しかしながら、Oracleで定義しているカラムのデータ型は、NUMBER型
根本原因が不明の状況となります。
定義や環境は以下となります。
環境: Microsoft Windows 7 Enterprise 6.1.7601 Service Pack 1 ビルド 7601 Java 1.8.0_192 Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production embulk (0.9.15 java) embulk-input-oracle (0.9.3) embulk-output-bigquery (0.4.9) embulk-filter-timestamp_format (0.3.3) ■Oracle定義 SQL> desc T_RS_TRAN 名前 NULL? 型 ----------------------------------------- -------- ---------------------------- ORDER_NO NUMBER(15) ■Embulk定義 in: type: oracle path_prefix: null driver_path: xxxx\product\12.2.0\dbhome_1\sqldeveloper\jdbc\lib\ojdbc7.jar host: A0430-02396 user: system password: xxx database: ORCL table: T_RS_TRAN incremental_columns: [ORDER_NO] incremental: true columns: - {name: ORDER_NO, type: string} ■実行時のエラー org.embulk.exec.PartialExecutionException: org.embulk.spi.DataException: Column type 'double' set at incremental_columns option is not supported at org.embulk.exec.BulkLoader$LoaderState.buildPartialExecuteException(BulkLoader.java:340) at org.embulk.exec.BulkLoader.doRun(BulkLoader.java:566) at org.embulk.exec.BulkLoader.access$000(BulkLoader.java:35) at org.embulk.exec.BulkLoader$1.run(BulkLoader.java:353) at org.embulk.exec.BulkLoader$1.run(BulkLoader.java:350) at org.embulk.spi.Exec.doWith(Exec.java:22) at org.embulk.exec.BulkLoader.run(BulkLoader.java:350) at org.embulk.EmbulkEmbed.run(EmbulkEmbed.java:178) at org.embulk.EmbulkRunner.runInternal(EmbulkRunner.java:292) at org.embulk.EmbulkRunner.run(EmbulkRunner.java:156) at org.embulk.cli.EmbulkRun.runSubcommand(EmbulkRun.java:436) at org.embulk.cli.EmbulkRun.run(EmbulkRun.java:91) at org.embulk.cli.Main.main(Main.java:64) Caused by: org.embulk.spi.DataException: Column type 'double' set at incremental_columns option is not supported at org.embulk.input.jdbc.getter.AbstractColumnGetter.encodeToJson(org/embulk/input/jdbc/getter/AbstractColumnGetter.java:92) at org.embulk.input.jdbc.AbstractJdbcInputPlugin$LastRecordStore.accept(org/embulk/input/jdbc/AbstractJdbcInputPlugin.java:441) at org.embulk.input.jdbc.AbstractJdbcInputPlugin.run(org/embulk/input/jdbc/AbstractJdbcInputPlugin.java:490) at org.embulk.exec.LocalExecutorPlugin$ScatterExecutor.runInputTask(org/embulk/exec/LocalExecutorPlugin.java:269) at org.embulk.exec.LocalExecutorPlugin$ScatterExecutor.access$100(org/embulk/exec/LocalExecutorPlugin.java:194) at org.embulk.exec.LocalExecutorPlugin$ScatterExecutor$1.call(org/embulk/exec/LocalExecutorPlugin.java:233) at org.embulk.exec.LocalExecutorPlugin$ScatterExecutor$1.call(org/embulk/exec/LocalExecutorPlugin.java:230) at java.util.concurrent.FutureTask.run(java/util/concurrent/FutureTask) at java.util.concurrent.ThreadPoolExecutor.runWorker(java/util/concurrent/ThreadPoolExecutor) at java.util.concurrent.ThreadPoolExecutor$Worker.run(java/util/concurrent/ThreadPoolExecutor$Worker) at java.lang.Thread.run(java/lang/Thread) Error: org.embulk.spi.DataException: Column type 'double' set at incremental_columns option is not supported
■embulkによるseed.ymlファイルのpreview結果 2019-02-21 15:33:49.668 +0900: Embulk v0.9.15 2019-02-21 15:33:50.042 +0900 [WARN] (main): DEPRECATION: JRuby org.jruby.embed.ScriptingContainer is directly injected. 2019-02-21 15:33:52.433 +0900 [INFO] (main): Gem's home and path are set by default: "C:\Users\yazaki.embulk\lib\gems" 2019-02-21 15:33:53.222 +0900 [INFO] (main): Started Embulk v0.9.15 2019-02-21 15:33:53.284 +0900 [INFO] (0001:preview): Loaded plugin embulk-input-oracle (0.9.3) 2019-02-21 15:33:53.315 +0900 [INFO] (0001:preview): Connecting to jdbc:oracle:thin:@A0430-02396:1521:ORCL options {oracle.jdbc.ReadTimeout=1800000, user=system, password=***, oracle.net.CONNECT_TIMEOUT=300000} 2019-02-21 15:33:53.690 +0900 [INFO] (0001:preview): Using JDBC Driver 12.1.0.2.0 2019-02-21 15:33:53.846 +0900 [INFO] (0001:preview): Connecting to jdbc:oracle:thin:@A0430-02396:1521:ORCL options {oracle.jdbc.ReadTimeout=1800000, user=system, password=***, oracle.net.CONNECT_TIMEOUT=300000} 2019-02-21 15:33:53.939 +0900 [INFO] (0001:preview): SQL: SELECT * FROM "T_RS_TRAN" ORDER BY "ORDER_NO" 2019-02-21 15:33:53.955 +0900 [INFO] (0001:preview): > 0.02 seconds +-----------------+----------------+---------------------+-----------------+ | ORDER_NO:double | RS_TYPE:string | FACTORY_CODE:string | ORG_CODE:string | +-----------------+----------------+---------------------+-----------------+ | 2.1002419E7 | 1 | 8000 | MQ9 | | 2.100242E7 | 1 | 7500 | TWP | | 2.100243E7 | 1 | 7500 | 5BN | ■Oracleに取り込んだデータ "21023317","2","8100","XD9",2018/06/26,"VHP5FUH3F78C",1,"38A8U","06",0,"ZZZ" "21023321","2","8000","7J7",2018/07/14,"YT98FCU5ZSG5",50,"I0ZSCQX0","30",0," SQL> desc T_RS_TRAN 名前 NULL? 型 ----------------------------------------- -------- ---------------------------- ORDER_NO NUMBER(15) RS_TYPE VARCHAR2(1) FACTORY_CODE VARCHAR2(4) ORG_CODE VARCHAR2(3) TRAN_DATE DATE
回答6件
あなたの回答
tips
プレビュー