adf雪花源副本活动查询

问题描述 投票:0回答:0

I有一个ADF复制活动(雪花源,Azure存储池),该活动使用变量在模式和表格中传递。以下是动态查询...

dynamic查询

它失败了“模板函数” IEM'未定义或无效'。查询生成的输入是此...

输入

确定我在做什么错。模式和表需要双引号,否则雪花实例将拒绝它。当查询硬编码表(即从“架构”中选择 *)时,它可以正常工作。任何建议都将不胜感激。 与JSON结合使用。我将其更改为一个没有参数的简单选择语句。仍然遇到相同的错误。但是,当我预览数据时,它起作用。 我只包括json的复制活动,因为整个管道太大。 { "name": "aCopyFull", "type": "Copy", "dependsOn": [ { "activity": "DeleteExistingFiles in tmp folder", "dependencyConditions": [ "Succeeded" ] } ], "policy": { "timeout": "7.00:00:00", "retry": 2, "retryIntervalInSeconds": 30, "secureOutput": false, "secureInput": false }, "userProperties": [ { "name": "SourceSystem", "value": "@{item().ConnectionID}" }, { "name": "Table", "value": "@{item().SourceEntityName}" }, { "name": "TTID", "value": "@{iem().SourceEntityId}" } ], "typeProperties": { "source": { "type": "SnowflakeV2Source", "query": { "value": "SELECT * FROM \"schema\".\"table\"", "type": "Expression" }, "exportSettings": { "type": "SnowflakeExportCopyCommand" } }, "sink": { "type": "DelimitedTextSink", "storeSettings": { "type": "AzureBlobStorageWriteSettings" }, "formatSettings": { "type": "DelimitedTextWriteSettings", "quoteAllText": true, "fileExtension": ".txt" } }, "enableStaging": false }, "inputs": [ { "referenceName": "DSRedzone", "type": "DatasetReference", "parameters": { "tableName": "@item().SourceEntityName", "schemaName": "@item().SourceSchemaName" } } ], "outputs": [ { "referenceName": "DSBlobStorage_SAS_csv", "type": "DatasetReference", "parameters": { "Container": { "value": "@item().TargetSubSystem", "type": "Expression" }, "Directory": { "value": "@{concat(item().TargetDirectory, '_tmp')}", "type": "Expression" }, "File": { "value": "@{item().TargetFile}", "type": "Expression" }, "Separator": ",", "HeaderRow": "true", "Escape": "\"", "Quote": "\"" } } ] }

看起来像该问题一样,是如何在ADF中形成动态查询的。错误“模板函数” IEM'未定义或无效'表明您的表达式可能存在语法问题。确保您正确地逃脱了动态查询中的双引号。尝试使用@concat('“”,变量('schema'),'。',variables('table'),'“'”)以双引号将架构和表名称清晰包裹。另外,验证变量值中没有额外的空格或意外字符。如果您使用 @{}语法,请仔细检查所有函数和变量的正确引用。

sql azure azure-data-factory escaping
最新问题
© www.soinside.com 2019 - 2025. All rights reserved.