Skip to content

Instantly share code, notes, and snippets.

@hiroyuki-sato
Created June 3, 2021 11:26
Show Gist options
  • Save hiroyuki-sato/b2ef06e688875b8b121d6da615c277b6 to your computer and use it in GitHub Desktop.
Save hiroyuki-sato/b2ef06e688875b8b121d6da615c277b6 to your computer and use it in GitHub Desktop.
embulk-input-mysql error
+--------------+------------+------+-----+---------+-------+
| Field        | Type       | Null | Key | Default | Extra |
+--------------+------------+------+-----+---------+-------+
| name         | text       | YES  |     | NULL    |       |
| name_kana    | text       | YES  |     | NULL    |       |
| mail_address | text       | YES  |     | NULL    |       |
| sex          | text       | YES  |     | NULL    |       |
| age          | bigint(20) | YES  |     | NULL    |       |
| birthday     | date       | YES  |     | NULL    |       |
| prefecture   | text       | YES  |     | NULL    |       |
| curry        | text       | YES  |     | NULL    |       |
+--------------+------------+------+-----+---------+-------+
8 rows in set (0.01 sec)
out:
  type: stdout

in:
  type: mysql
  database: embulk_test
  user: user
  password: pass
  host: host

  use_raw_query_with_incremental: true
  incremental_columns: [age]
  incremental: true
  last_record: [1]
  query: "select * from users where age > :age order by age"
org.embulk.exec.PartialExecutionException: java.lang.IndexOutOfBoundsException: Index: 4, Size: 1
	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:242)
	at org.embulk.EmbulkRunner.runInternal(EmbulkRunner.java:291)
	at org.embulk.EmbulkRunner.run(EmbulkRunner.java:155)
	at org.embulk.cli.EmbulkRun.runSubcommand(EmbulkRun.java:431)
	at org.embulk.cli.EmbulkRun.run(EmbulkRun.java:90)
	at org.embulk.cli.Main.main(Main.java:64)
	Suppressed: java.lang.NullPointerException
		at org.embulk.exec.BulkLoader.doCleanup(BulkLoader.java:463)
		at org.embulk.exec.BulkLoader$3.run(BulkLoader.java:397)
		at org.embulk.exec.BulkLoader$3.run(BulkLoader.java:394)
		at org.embulk.spi.Exec.doWith(Exec.java:22)
		at org.embulk.exec.BulkLoader.cleanup(BulkLoader.java:394)
		at org.embulk.EmbulkEmbed.run(EmbulkEmbed.java:245)
		... 5 more
Caused by: java.lang.IndexOutOfBoundsException: Index: 4, Size: 1
	at java.util.ArrayList.rangeCheck(ArrayList.java:659)
	at java.util.ArrayList.get(ArrayList.java:435)
	at org.embulk.input.jdbc.JdbcInputConnection.replacePlaceholder(JdbcInputConnection.java:400)
	at org.embulk.input.jdbc.JdbcInputConnection.wrapIncrementalQuery(JdbcInputConnection.java:304)
	at org.embulk.input.jdbc.AbstractJdbcInputPlugin.setupTask(AbstractJdbcInputPlugin.java:302)
	at org.embulk.input.jdbc.AbstractJdbcInputPlugin.transaction(AbstractJdbcInputPlugin.java:223)
	at org.embulk.exec.BulkLoader.doRun(BulkLoader.java:507)
	... 11 more
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment