Instead of passing in a file reader, it looks like we can pass in a StringReader to PhoenixConnection.executeStatements?().
If we change PhoenixRuntime a bit to take in a query string (maybe with a '-q' parameter or something), it'll be easy to write a new python script where the first argument is the .sql file, and the rest are the positional arguments. Mark ________________________________ From: Gabriel Reid <[email protected]> Sent: Saturday, March 28, 2015 8:20 AM To: [email protected] Subject: Re: phoenix psql.py tool call sql script and send the parameter Hi, No, there isn't currently any way to do any kind of variable/parameter replacement via psql.py. I think there must be some clever ways to do this automatically on the command line outside of psql, although I'm not aware of any specific way of doing it. - Gabriel On Fri, Mar 27, 2015 at 9:27 AM zhaochuge <[email protected]<mailto:[email protected]>> wrote: Hi guys, I want send the parameter to the sql script when using phoenix psql.py tool call sql script . I don't know this method is feasible . If the method is feasible , please provid psql.py tool syntax and phoenix sql script using variable syntax . Thanks. O'neal
