Skip to content

Instantly share code, notes, and snippets.

@hiroyuki-sato
Created June 8, 2021 10:44
Show Gist options
  • Save hiroyuki-sato/f55423de5bca93ab228099047d803cd4 to your computer and use it in GitHub Desktop.
Save hiroyuki-sato/f55423de5bca93ab228099047d803cd4 to your computer and use it in GitHub Desktop.
embulk-input-jdbc error
in:
  type: postgresql
  host: localhost
  user: user
  password: xxxx
  database: embulk_test
  #table: users
  query: select name,,mail from users # duplicate comma
out:
  type: stdout

NGの場合

2021-06-08 18:32:54.416 +0900: Embulk v0.9.23
2021-06-08 18:32:55.308 +0900 [WARN] (main): DEPRECATION: JRuby org.jruby.embed.ScriptingContainer is directly injected.
2021-06-08 18:32:57.528 +0900 [INFO] (main): Gem's home and path are set by default: "/Users/user/.embulk/lib/gems"
2021-06-08 18:32:58.432 +0900 [INFO] (main): Started Embulk v0.9.23
2021-06-08 18:32:58.573 +0900 [INFO] (0001:preview): Loaded plugin embulk-input-postgresql (0.10.1)
2021-06-08 18:32:58.613 +0900 [INFO] (0001:preview): JDBC Driver = /Users/user/.embulk/lib/gems/gems/embulk-input-postgresql-0.10.1/default_jdbc_driver/postgresql-9.4-1205-jdbc41.jar
2021-06-08 18:32:58.618 +0900 [INFO] (0001:preview): Connecting to jdbc:postgresql://localhost:5432/embulk_test options {ApplicationName=embulk-input-postgresql, user=user, password=***, tcpKeepAlive=true, loginTimeout=300, socketTimeout=1800}
2021-06-08 18:32:58.674 +0900 [INFO] (0001:preview): SQL: SET search_path TO "public"
2021-06-08 18:32:58.681 +0900 [INFO] (0001:preview): Using JDBC Driver PostgreSQL 9.4 JDBC4.1 (build 1205)
java.lang.RuntimeException: org.postgresql.util.PSQLException: ERROR: syntax error at or near ","
  ポジション: 13

OKの場合

2021-06-08 19:21:29.140 +0900 [INFO] (0014:task-0000): Connecting to jdbc:postgresql://localhost:5432/embulk_test options {ApplicationName=embulk-input-postgresql, user=user, password=***, tcpKeepAlive=true, loginTimeout=300, socketTimeout=1800}
2021-06-08 19:21:29.147 +0900 [INFO] (0014:task-0000): SQL: SET search_path TO "public"
2021-06-08 19:21:29.149 +0900 [INFO] (0014:task-0000): SQL: DECLARE cur NO SCROLL CURSOR FOR select name,mail from users
2021-06-08 19:21:29.152 +0900 [INFO] (0014:task-0000): SQL: FETCH FORWARD 10000 FROM cur
2021-06-08 19:21:29.154 +0900 [INFO] (0014:task-0000): > 0.00 seconds
2021-06-08 19:21:29.157 +0900 [INFO] (0014:task-0000): SQL: FETCH FORWARD 10000 FROM cur
2021-06-08 19:21:29.159 +0900 [INFO] (0014:task-0000): > 0.00 seconds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment