Advertisement
Guest User

Untitled

a guest
Jul 11th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3.  
  4. DIR="/cygdrive/c/elasticsearch-jdbc-2.3.4.1/"
  5. bin=${DIR}/../bin
  6. lib=${DIR}/../lib
  7.  
  8. echo '{
  9. "type" : "jdbc",
  10. "jdbc" : {
  11. "url" : "jdbc:postgresql://localhost:5432/demodb?loglevel=0",
  12. "user" : "postgres",
  13. "password" : "abc123",
  14. "sql" : "select * from srt",
  15. "index_settings" : {
  16. "index" : {
  17. "number_of_shards" : 10
  18. }
  19. }
  20. }
  21. }
  22. ' | java \
  23. -cp "C:\elasticsearch-jdbc-2.3.4.1\bin\*" \
  24. -Dlog4j.configurationFile="C:\elasticsearch-jdbc-2.3.4.1\bin\log4j2.xml" \
  25. org.xbib.tools.Runner \
  26. org.xbib.tools.JDBCImporter
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement