如何引用 Camel SQL 组件命名参数,其中参数名称为大小写混合且包含空格?

How to refer to a Camel SQL component named parameter where the parameter name is in mixed case and contains spaces?

我正在使用 Camel SQL 组件将 CSV 文件加载到 Postgresql 数据库中。 原始 CSV 文件 header 名称(列)大小写与空格混合,例如"Cost Price"

SQL 组件引用属性文件中的 SQL 插入语句, 例如 insert into upload_data(year,month,cost)values(:#year,:#month,:#Cost Price)

我收到这个错误: 原因:[org.springframework.jdbc.BadSqlGrammarException - PreparedStatementCallback;错误 SQL 语法 [];嵌套异常是 org.postgresql.util.PSQLException:错误:在“:”处或附近的语法错误...

-仓位指的是#Cost Price

之前的:

如果我将参数名称更改为 cost_price 并修改 CSV 文件,则文件会正确上传。

我试过在插入语句中用“'\”和{}包围参数

是否可以使用转义符或其他方式在命名参数中使用混合大小写和空格,或者我是否需要干预和修改 CSV header?

SQL 组件不支持这一点,事实上在 header 名称中使用空格是一个非常糟糕的设计。因此,在您读取 CSV 文件后,您可以在调用 SQL 组件之前更改 header 名称。