elasticsearch-jdbc icon indicating copy to clipboard operation
elasticsearch-jdbc copied to clipboard

Move to HOCON from JSON to make less escaping by using triple quotes """

Open apatrida opened this issue 8 years ago • 1 comments

I did a similar solution, but just wrapped Spark SQL into a configuration file. (https://github.com/kohesive/elasticsearch-data-import-handler)

Using HOCON is better than JSON because you can use """ around SQL statements and not need to escape everything. Use TypeSafe Config to load the HOCON which you can then render as JSON and parse as normal.

apatrida avatar Mar 29 '17 19:03 apatrida

I put the SQL queries in a different file and link the file in the JSON config. This way I can manage the SQL queries well and I can even just copy the SQL query and run it in my SQL Tool.

sanaulla123 avatar Apr 11 '17 06:04 sanaulla123