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
Post a Comment