我在 ADF 管道中有以下查找活动,它使用新的 SnowflakeV2 链接服务。但是,有时即使查询正确,它也不会返回任何值。在使用旧的 Snowflake 链接服务之前,我从未经历过这样的事情。
有人可以帮忙建议一下出了什么问题以及如何确保该值返回吗?
下面附上管道json:
{
"name": "4_1 Curated to Transformed",
"properties": {
"activities": [
{
"name": "Lookup Job Details Transformed Table",
"type": "Lookup",
"dependsOn": [],
"policy": {
"timeout": "0.12:00:00",
"retry": 0,
"retryIntervalInSeconds": 30,
"secureOutput": false,
"secureInput": false
},
"userProperties": [],
"typeProperties": {
"source": {
"type": "SnowflakeV2Source",
"query": {
"value": "SELECT * FROM ETL_CONFIG.T_ETL_CONFIG_DETAILS_TRANSFORMED_MAIN WHERE ACTIVE_IND = 'TRUE' AND JOB_ID = '@{pipeline().parameters.jobID}' ORDER BY CONFIG_DETAIL_ID",
"type": "Expression"
},
"exportSettings": {
"type": "SnowflakeExportCopyCommand"
}
},
"dataset": {
"referenceName": "SF_ETL_CONFIG_new",
"type": "DatasetReference",
"parameters": {
"schemaName": "ETL_CONFIG",
"tableName": "T_ETL_JOB_DETAILS_MAIN"
}
},
"firstRowOnly": false
}
}
],
"parameters": {
"jobID": {
"type": "string",
"defaultValue": "4030"
},
"businessArea": {
"type": "string"
},
"email": {
"type": "string"
},
"Load_Group": {
"type": "string"
}
},
"folder": {
"name": "Athena/4 Curated to Transformed"
},
"annotations": [],
"lastPublishTime": "2023-11-24T06:20:51Z"
},
"type": "Microsoft.DataFactory/factories/pipelines"
}
我尝试直接在 Snowflake 上测试 ADF 上使用的查询,它可以工作,不确定是 ADF 问题还是 Snowflake 问题
@{pipeline().parameters.jobID}
表达式来获取 JOB_ID
值是否正确传递的查询。ACTIVE_IND = 'TRUE'
或匹配JOB_ID
),则不会返回任何结果。检查Snowflake中的查询条件是否总是返回数据。查看此文档以了解更多有关 使用雪花连接器进行查找的信息。