Jitterbit 数据加载器在从 salesforce 获取附件时出现问题

Jitterbit data loader giving issue while fetching attachment from salesforce

Jitterbit 数据加载器在从 salesforce 获取附件时出现访问问题。 我能够从 salesforce 获取 .pdf 和 .jpeg 文件,但在将 .csv 和平面文件从 salesforce 传输到其他系统时出现访问问题。 以下是作业完成后显示的问题

The operation "Query Attachments (3)" completed successfully.

Information

Failed to evaluate target: Body and the instance list is 1;. Failed to write to the target "SFTP Target". Reason: Failed to put the local file C:/Windows/Temp/jitterbit_dl6/CachedTargets/T_544538/1c7cbc33-05ca-4e38-abdf-2b8c62ebf917 to the url /Manual-TCI-CSV-2016-08-23 11:20:33.csv Failed to put data to the url /Manual-TCI-CSV-2016-08-23 11:20:33.csv. Access denied to remote resource. Upload failed: Permission denied (3/-31). Error occurred when evaluating function at line 7 FlushFile( Failed to write to the target "SFTP Target". Reason: Failed to put the local file
C:/Windows/Temp/jitterbit_dl6/CachedTargets/T_544538/1c7cbc33-05ca-4e38-abdf-2b8c62ebf917 to the url /Manual-TCI-CSV-2016-08-23 11:20:33.csv Failed to put data to the url /Manual-TCI-CSV-2016-08-23 11:20:33.csv. Access denied to remote resource. Upload failed: Permission denied (3/-31). Error occurred when evaluating function at line 7 FlushFile( Failed to evaluate target: Body and the instance list is 1;. Failed to write to the target "SFTP Target". Reason: Failed to put the local file C:/Windows/Temp/jitterbit_dl6/CachedTargets/T_544538/1c7cbc33-05ca-4e38-abdf-2b8c62ebf917 to the url /Manual-TCI-CSV-2016-08-23 11:20:33.csv Failed to put data to the url /Manual-TCI-CSV-2016-08-23 11:20:33.csv. Access denied to remote resource. Upload failed: Permission denied (3/-31). Error occurred when evaluating function at line 7 FlushFile(

下面是我用来将文件写入其他系统的代码:

$body = Base64Decode(root$transaction.response$body$queryResponse$result$records.Attachment$Body$);
$name = root$transaction.response$body$queryResponse$result$records.Attachment$Name$; 
WriteFile("<TAG>Targets/Files/Attachment</TAG>", $body, $name); 
FlushFile("<TAG>Targets/Files/Attachment</TAG>", $name);

请让我知道我该怎么办?

您似乎在 Windows 上,但正在检索在 Unix/Linux/MacOS 上生成的文件。您将无法使用以下名称写入文件:

Manual-TCI-CSV-2016-08-23 11:20:33.csv

原因是冒号(":")在WindowsOS中是分隔符,表示盘符,不能用于文件名。

  • 您可以找到 Mac 或 Linux 框和 运行 相同的 Jitterbit 作业。将传输所有文件,然后由您使用安全名称重命名它们 (https://support.apple.com/en-gb/HT202808)。
  • 其他选择是在您的代码中包含一些正则表达式来搜索字符“:”并在下载之前用“-”替换它。

希望这对您有所帮助。 :)