エラーを下回っているSQLステートメントを実行しているときに、ドゥービー機能JDBCを使用して動的な値を渡すpostgresqlデータベースのテーブルを更新しようとしています。
コード
作業コード
sql"""UPDATE layout_lll
|SET runtime_params = 'testing string'
|WHERE run_id = '123-ksdjf-oreiwlds-9dadssls-kolb'
|""".stripMargin.update.quick.unsafeRunSync
動作しないコード
val abcRunTimeParams="testing string"
val runID="123-ksdjf-oreiwlds-9dadssls-kolb"
sql"""UPDATE layout_lll
|SET runtime_params = '${abcRunTimeParams}'
|WHERE run_id = '$runID'
|""".stripMargin.update.quick.unsafeRunSync
エラー
Exception in thread "main" org.postgresql.util.PSQLException: The column index is out of range: 3, number of columns: 2.