Project: springxd
Issue XD-1789: New job that executes SQL script using JDBC
Create OOTB batch job that executes SQL script using JDBC - can be used for Hive2 jobs or HAWQ jobs etc. Christian Tzolov provided the following baed on Dave Syers JdbcTasklte (https://src.springframework.org/svn/spring-batch-admin/sandbox/cloud-sample/src/main/java/org/springframework/batch/admin/sample/job/JdbcTasklet.java): Attached is a simple job module that can run sql commands on Hawq or other DB over jdbc. Just unzip it in /xd/modules/job folder and create something like this: xd> job create analyticsJob --definition " jdbc --driverClassName=org.postgresql.Driver --url=jdbc:postgresql://:5432/gpadmin --username=gpadmin --password='' --sql='CREATE TABLE fonecta_demo.analytics AS SELECT segmenttiluokka, count(*) as cnt FROM fonecta_demo.segmenttiluokka GROUP BY segmenttiluokka;'" --deploy
Story points: 5