scala - PostgreSQL syntax error at or near "$1" -


sql"""copy updatetable $path credentials 'aws_access_key_id=<my_access_key_id>;aws_secret_access_key=<my_secret_access_key>' json '<path_to_s3_repository>' gzip;""".update().apply() 

above command gives

org.postgresql.util.psqlexception: error: syntax error @ or near "$1" 

when run on spark streaming using scala. might issue? resultant query runs fine when run command line.

you cannot use parameter copy.

you have add literal value of $path statement string , execute that.


Comments

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -