ClickHouse / clickhouse-jdbc-bridge

A JDBC proxy from ClickHouse to external databases
Apache License 2.0
168 stars 60 forks source link

feature: cli tool #118

Open mikeTWC1984 opened 2 years ago

mikeTWC1984 commented 2 years ago

While jdbc-bridge functionality is awsome, I think in certain scenarios it might be overkill to spin up/monitor another service (e.g. for some etl script you run on client side). I presume it should be somewhat straightforward (basically replacing http stream with stdin/stdout or file). Something like this:

clickhouse-client --query 'select * from test' | jdbc-tool --write --table test
jdbc-tool  --query "select * from test" | clickhouse-client --query "INSERT INTO ...."
zhicwu commented 2 years ago

Thanks @mikeTWC1984. I never thought about this and it does make sense to me. Will get back to this after delivering new version of jdbc driver.