Last active
August 29, 2015 14:22
-
-
Save higebu/b10f99e997bd8e793a33 to your computer and use it in GitHub Desktop.
Embulk outside valid range for the datatype BIGINT error.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2015-06-04 17:40:01.925 +0900: Embulk v0.6.11 | |
2015-06-04 17:40:03.415 +0900: Loaded plugin embulk-input-mysql (0.4.0) | |
2015-06-04 17:40:03.452 +0900 [INFO] (transaction): Fetch size is 10000. Using server-side prepared statement. | |
2015-06-04 17:40:03.796 +0900 [INFO] (transaction): {done: 0 / 1, running: 0} | |
2015-06-04 17:40:03.832 +0900 [INFO] (task-0000): Writing local file 'zabbix_trends_uint_.000.00csv' | |
2015-06-04 17:40:03.847 +0900 [INFO] (task-0000): Fetch size is 10000. Using server-side prepared statement. | |
2015-06-04 17:40:03.853 +0900 [INFO] (task-0000): SQL: SELECT i_h.itemid, i_h.key_, i_h.type, i_h.units, item_name, host_name, FROM_UNIXTIME(t.clock) as timestamp, t.num, t.value_min, t.value_avg, t.value_max fr | |
om trends_uint as t INNER JOIN (SELECT i.itemid, i.key_, i.type, i.name as item_name, i.units, h.name as host_name FROM items as i INNER JOIN hosts as h ON i.hostid = h.hostid) as i_h ON i_h.itemid = t.itemid WH | |
ERE clock = UNIX_TIMESTAMP(FROM_UNIXTIME(UNIX_TIMESTAMP(DATE_ADD(NOW(), INTERVAL -1 HOUR)),'%Y-%m-%d %H:00:00')) | |
2015-06-04 17:40:09.223 +0900 [INFO] (task-0000): > 5.36 seconds | |
2015-06-04 17:40:09.448 +0900 [INFO] (task-0000): Fetched 500 rows. | |
2015-06-04 17:40:09.554 +0900 [INFO] (task-0000): Fetched 1,000 rows. | |
2015-06-04 17:40:09.697 +0900 [INFO] (task-0000): Fetched 2,000 rows. | |
2015-06-04 17:40:09.819 +0900 [INFO] (task-0000): Fetched 4,000 rows. | |
2015-06-04 17:40:09.988 +0900 [INFO] (task-0000): Fetched 8,000 rows. | |
2015-06-04 17:40:10.055 +0900 [INFO] (transaction): {done: 1 / 1, running: 0} | |
2015-06-04 17:40:10.068 +0900 [INFO] (main): Transaction partially failed. Cleaning up the intermediate data. Use -r option to make it resumable. | |
org.embulk.exec.PartialExecutionException: java.lang.RuntimeException: com.mysql.jdbc.exceptions.jdbc4.MySQLDataException: '18446743968218275840' in column '9' is outside valid range for the datatype BIGINT. | |
at org.embulk.exec.BulkLoader$LoaderState.buildPartialExecuteException(org/embulk/exec/BulkLoader.java:331) | |
at org.embulk.exec.BulkLoader.doRun(org/embulk/exec/BulkLoader.java:526) | |
at org.embulk.exec.BulkLoader.access$100(org/embulk/exec/BulkLoader.java:36) | |
at org.embulk.exec.BulkLoader$1.run(org/embulk/exec/BulkLoader.java:342) | |
at org.embulk.exec.BulkLoader$1.run(org/embulk/exec/BulkLoader.java:338) | |
at org.embulk.spi.Exec.doWith(org/embulk/spi/Exec.java:24) | |
at org.embulk.exec.BulkLoader.run(org/embulk/exec/BulkLoader.java:338) | |
at org.embulk.command.Runner.run(org/embulk/command/Runner.java:148) | |
at org.embulk.command.Runner.main(org/embulk/command/Runner.java:101) | |
at java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:606) | |
at RUBY.run(file:/usr/local/bin/embulk!/embulk/command/embulk_run.rb:339) | |
at classpath_3a_embulk.command.embulk.(root)(classpath:embulk/command/embulk.rb:43) | |
at classpath_3a_embulk.command.embulk.(root)(classpath_3a_embulk/command/classpath:embulk/command/embulk.rb:43) | |
at org.embulk.cli.Main.main(org/embulk/cli/Main.java:11) | |
Caused by: java.lang.RuntimeException: com.mysql.jdbc.exceptions.jdbc4.MySQLDataException: '18446743968218275840' in column '9' is outside valid range for the datatype BIGINT. | |
at com.google.common.base.Throwables.propagate(Throwables.java:160) | |
at org.embulk.input.jdbc.AbstractJdbcInputPlugin.run(AbstractJdbcInputPlugin.java:239) | |
at org.embulk.spi.util.Executors.process(Executors.java:59) | |
at org.embulk.spi.util.Executors.process(Executors.java:39) | |
at org.embulk.exec.LocalExecutorPlugin$2.call(LocalExecutorPlugin.java:105) | |
at org.embulk.exec.LocalExecutorPlugin$2.call(LocalExecutorPlugin.java:101) | |
at java.util.concurrent.FutureTask.run(FutureTask.java:262) | |
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) | |
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) | |
at java.lang.Thread.run(Thread.java:745) | |
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLDataException: '18446743968218275840' in column '9' is outside valid range for the datatype BIGINT. | |
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) | |
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) | |
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) | |
at java.lang.reflect.Constructor.newInstance(Constructor.java:526) | |
at com.mysql.jdbc.Util.handleNewInstance(Util.java:377) | |
at com.mysql.jdbc.Util.getInstance(Util.java:360) | |
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:963) | |
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:935) | |
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:924) | |
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:870) | |
at com.mysql.jdbc.ResultSetImpl.throwRangeException(ResultSetImpl.java:7090) | |
at com.mysql.jdbc.ResultSetImpl.getNativeLong(ResultSetImpl.java:4008) | |
at com.mysql.jdbc.ResultSetImpl.getLong(ResultSetImpl.java:2734) | |
at com.mysql.jdbc.ResultSetImpl.getLong(ResultSetImpl.java:2650) | |
at org.embulk.input.jdbc.getter.ColumnGetters$LongColumnGetter.getAndSet(ColumnGetters.java:46) | |
at org.embulk.input.jdbc.AbstractJdbcInputPlugin.fetch(AbstractJdbcInputPlugin.java:275) | |
at org.embulk.input.jdbc.AbstractJdbcInputPlugin.run(AbstractJdbcInputPlugin.java:230) | |
... 8 more | |
Error: java.lang.RuntimeException: com.mysql.jdbc.exceptions.jdbc4.MySQLDataException: '18446743968218275840' in column '9' is outside valid range for the datatype BIGINT. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exec: {} | |
in: | |
type: mysql | |
host: localhost | |
user: zabbix | |
password: zabbix | |
database: zabbix | |
query: | | |
SELECT i_h.itemid, i_h.key_, i_h.type, i_h.units, item_name, host_name, FROM_UNIXTIME(t.clock) as timestamp, t.num, CAST(t.value_min AS char), CAST(t.value_avg AS char), CAST(t.value_max AS char) from trends_uint as t INNER JOIN (SELECT i.itemid, i.key_, i.type, i.name as item_name, i.units, h.name as host_name FROM items as i INNER JOIN hosts as h ON i.hostid = h.hostid) as i_h ON i_h.itemid = t.itemid WHERE clock = UNIX_TIMESTAMP(FROM_UNIXTIME(UNIX_TIMESTAMP(DATE_ADD(NOW(), INTERVAL -1 HOUR)),'%Y-%m-%d %H:00:00')) | |
out: | |
type: file | |
path_prefix: zabbix_trends_uint | |
file_ext: csv | |
formatter: {type: csv, timezone: Asia/Tokyo} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
CAST(xxx as char) で回避