简体   繁体   English

Azure 数据工厂将 Salesforce 表的“对象 api 名称”作为 ForEach 的参数传递

[英]Azure Data Factory Pass “Object api name” of Salesforce Tables as Parameter from ForEach

I trying to load some tables from Salesforce , the number of tables can change from time to time.我试图从Salesforce加载一些表,表的数量可能会不时改变。 We created a CSV file on a blob storage which contains the name of tables that we want to load from Salesforce, this CSV contains one column as shown bellow:我们在 blob 存储上创建了 CSV 文件,其中包含我们要从 Salesforce 加载的表的名称,此 CSV 包含一列,如下所示:

CSV File CSV 文件

I have created a Lookup activity that refers to the CSV file (and I disabled the option of First row only), then I connected it to a ForEach activity which iterates over each row of the Lookup activity , as shown bellow:我创建了一个引用 CSV 文件的Lookup 活动(并且我只禁用了 First row 的选项),然后我将它连接到一个ForEach 活动,该活动遍历Lookup 活动的每一行,如下所示:

@activity('TablesLookup').output.value

Inside the Foreach I have created a Copy Data activity which has Salesforce as data source .在 Foreach 内部,我创建了一个复制数据活动,其中Salesforce 作为数据源

The problem here is that I'm trying to pass the table name of the Salesforce data source (the Object api name ) as a parameter from the ForEach.这里的问题是我试图将 Salesforce 数据源的表名Object api 名称)作为 ForEach 的参数传递。 But I didn't find the option where I can pass the table name .但是我没有找到可以传递 table name的选项。 Details on the figures bellow:下图的详细信息:

Salesforce Dataset - Parameters Salesforce 数据集 - 参数

Salesforce Dataset - Connection Salesforce 数据集 - 连接

ForEach - Copy Data, Salesforce Data Source ForEach - 复制数据,Salesforce 数据源

This gives me an the following error:这给了我以下错误:

ErrorCode=UserErrorOdbcOperationFailed,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=ERROR [HY000] [Microsoft][Salesforce] (120) SOQL_FIRST mode prepare failure: SOQL error: [Microsoft][SQLEngine] (31480) syntax error near 'SELECT *<<< ??? >>> FROM "Student"'. SQL error: [Microsoft][SQLEngine] (31740) Table or view not found: Deloitte..Student,Source=Microsoft.DataTransfer.ClientLibrary.Odbc.OdbcConnector,''Type=System.Data.Odbc.OdbcException,Message=ERROR [HY000] [Microsoft][Salesforce] (120) SOQL_FIRST mode prepare failure: SOQL error: [Microsoft][SQLEngine] (31480) syntax error near 'SELECT *<<< ??? >>> FROM "Student"'. SQL error: [Microsoft][SQLEngine] (31740) Table or view not found: Deloitte..Student,Source=Microsoft Salesforce ODBC Driver,'

Best regards,此致,

If your Lookup activity's output is like this:如果您的 Lookup 活动的 output 是这样的:

在此处输入图像描述

You need to change @item() to @item().Names when you pass your value of Table Name from Look up activity's output to parameter named 'tableName' in dataset(In 'ForEach - Copy Data, Salesforce Data Source' step).当您将表名称的值从查找活动的 output 传递到数据集中名为“tableName”的参数时,您需要将@item()更改为@item().Names (在“ForEach - 复制数据,Salesforce 数据源”步骤中) .

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 Azure 数据工厂中传递接收器数据库的动态表名 - How to pass dynamic table names for sink database in Azure Data Factory C#,如何从动态对象的字符串参数传递属性名称 - C#, How to pass property name from string parameter for Dynamic object 动态传递对象列表作为参数 - Dynamically Pass List of Object As A Parameter Azure 数据工厂根据行数对 csv/txt 文件进行动态分区 - Azure Data Factory DYNAMICALLY partition a csv/txt file based on rowcount 来自与 DocuSign 集成的 Salesforce 中自定义 object 字段的动态收件人 - Dynamic Recipient from custom object field in Salesforce integrated with DocuSign 将具体对象类型作为泛型方法的参数传递 - Pass concrete object type as parameter for generic method azure 数据工厂:链接服务参数化(使链接服务动态化) - azure data factory: Linked services parameterization (making linked service dynamic) Powershell将字符串传递给ForEach - Powershell pass string to ForEach 有什么方法可以将未定义的对象作为参数传递? C# - Is there any way to pass an undefined object as parameter? c# 动态连接字符串的“数据源”参数需要计算机名称 - Computer name is needed for “Data Source” parameter of dynamic connection string
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM