You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Copy Activity数据源查询解析错误:unexpected token: 'T15'排查求助

问题排查与解决

错误原因很明确:你拼接出来的查询语句里,日期值没有用单引号包裹。

变量LastModAccount的值是2024-02-14T15:02:57Z,原表达式拼接后生成的语句是:

Select Name, PersonEmail, RecordTypeId, PersonTitle 
from Account 
where LastModifiedDate>2024-02-14T15:02:57Z

Salesforce的查询引擎会把2024-02-14T15当成算术运算(2024减02减14T15),自然会抛出unexpected token: 'T15'的语法错误。

解决方法就是给日期变量加上单引号,修改后的管道表达式如下:

@concat('Select Name, PersonEmail, RecordTypeId, PersonTitle 
from Account 
where LastModifiedDate>\'',variables('LastModAccount'),'\'')

这样拼接后生成的正确查询语句是:

Select Name, PersonEmail, RecordTypeId, PersonTitle 
from Account 
where LastModifiedDate>'2024-02-14T15:02:57Z'

带单引号的日期字符串能被Salesforce正确识别为日期类型,语法错误就会消失。

内容的提问来源于stack exchange,提问作者Dhaval Mohandas

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.22 08:12:04