diff --git a/fabric/items/DIRECT Run Batch.DataPipeline/pipeline-content.json b/fabric/items/DIRECT Run Batch.DataPipeline/pipeline-content.json index 75595a7..959ed51 100644 --- a/fabric/items/DIRECT Run Batch.DataPipeline/pipeline-content.json +++ b/fabric/items/DIRECT Run Batch.DataPipeline/pipeline-content.json @@ -348,7 +348,7 @@ "size": "-1", "direction": "Input", "value": { - "value": "@string(activity('Run Modules').output.resultSets[0].rows)", + "value": "@string(if(equals(coalesce(activity('Run Modules').output.resultSetCount, 0), 0), json('[]'), activity('Run Modules').output.resultSets[0].rows))", "type": "Expression" } }, diff --git a/fabric/items/DIRECT Run Module.DataPipeline/pipeline-content.json b/fabric/items/DIRECT Run Module.DataPipeline/pipeline-content.json index 352c450..721d8d9 100644 --- a/fabric/items/DIRECT Run Module.DataPipeline/pipeline-content.json +++ b/fabric/items/DIRECT Run Module.DataPipeline/pipeline-content.json @@ -334,7 +334,7 @@ "size": "-1", "direction": "Input", "value": { - "value": "@string(activity('Run Modules').output.resultSets[0].rows)", + "value": "@string(if(equals(coalesce(activity('Run Modules').output.resultSetCount, 0), 0), json('[]'), activity('Run Modules').output.resultSets[0].rows))", "type": "Expression" } } diff --git a/fabric/templates/DIRECT Run Batch.template.json b/fabric/templates/DIRECT Run Batch.template.json index fc64eef..7e835bb 100644 --- a/fabric/templates/DIRECT Run Batch.template.json +++ b/fabric/templates/DIRECT Run Batch.template.json @@ -348,7 +348,7 @@ "size": "-1", "direction": "Input", "value": { - "value": "@string(activity('Run Modules').output.resultSets[0].rows)", + "value": "@string(if(equals(coalesce(activity('Run Modules').output.resultSetCount, 0), 0), json('[]'), activity('Run Modules').output.resultSets[0].rows))", "type": "Expression" } }, diff --git a/fabric/templates/DIRECT Run Module.template.json b/fabric/templates/DIRECT Run Module.template.json index c8c81f4..6283c87 100644 --- a/fabric/templates/DIRECT Run Module.template.json +++ b/fabric/templates/DIRECT Run Module.template.json @@ -334,7 +334,7 @@ "size": "-1", "direction": "Input", "value": { - "value": "@string(activity('Run Modules').output.resultSets[0].rows)", + "value": "@string(if(equals(coalesce(activity('Run Modules').output.resultSetCount, 0), 0), json('[]'), activity('Run Modules').output.resultSets[0].rows))", "type": "Expression" } }