Forum Discussion

eyeampraveen's avatar
eyeampraveen
Frequent Visitor
4 days ago

Dataflow Gen2 parameter works with current value but fails when passed from Fabric Pipeline

I have a Dataflow Gen2 that calls a SOAP API using Web.Contents().

The Dataflow has an APIKey Text parameter, which I use in Power Query:

v_apikey = Text.From(APIKey)

The value is inserted into the SOAP request header/body before making the Web.Contents() call.

The issue:

API key entered as the Dataflow parameter's current value → Works

Exact same API key passed from a Fabric Pipeline parameter → Fails

The failure eventually results in:

Expression.Error:

There weren't enough elements in the enumeration to complete the operation.

The SOAP XML navigation also shows an empty table:

#table({"Name", "Table"}, {})

I'm trying to understand the runtime execution path:

Pipeline parameter

 → Dataflow activity

    → Dataflow parameter

        → Power Query

           → Web.Contents()

Does Dataflow Gen2 apply Pipeline parameter overrides before Power Query/Web.Contents is evaluated, including any metadata evaluation?

Are there known limitations when a runtime Dataflow parameter is used inside the POST body of Web.Contents()?

Also, is there a safe way to verify that the Pipeline-supplied API key reached Power Query correctly without exposing the key itself?

3 Replies

  • Hi, that error usually means a step is trying to pick an item from an empty result. So most likely the API returned an error or empty response, which means the value reaching the dataflow isn't the same as your current value.

    Few things to check:
    1. Public parameter mode is enabled and the dataflow is saved.
    2. In the pipeline Dataflow activity, refresh the parameters list and check the name matches exactly (case sensitive).
    3. Pipeline expressions often add quotes or a trailing space. Try Text.Trim(Text.From(APIKey)).
    4. To confirm what arrived, write Text.Length(APIKey) to a small debug table and compare with the real key length.

    Let me know what you find.

  • eyeampraveen's avatar
    eyeampraveen
    Frequent Visitor

    Thanks for respsonding..

    1. Yes, I have already enabled parameters to be discovered and override for execution 
    2. I have verified parameter availability by adding a diagnostic query.
    3. The SOAP response works fine if I provide default APIKey.
    4. The detailed run logs are not available since the dataflow failed. 

  • v-abhinavmu's avatar
    v-abhinavmu
    Icon for Community Support rankCommunity Support

     

    Hi eyeampraveen​,
    Thanks for reaching out to the Microsoft Fabric Community forum.

    Please check the following to troubleshoot the difference between the current parameter value and the value supplied by the pipeline:

    1.    Verify public parameter configuration: Confirm that the Dataflow Gen2 supports CI/CD and that Enable parameters to be discovered and override for execution is enabled. In the pipeline's Dataflow activity, verify that APIKey is configured with the expected parameter type and value.

    2.    Verify parameter availability: Add a temporary diagnostic query that checks whether APIKey is non-null and nonempty. To verify the supplied value, compare it against the expected value using a secure method. Avoid displaying or logging the API key.

    3.    Inspect the SOAP response: Verify that the HTTP response contains the expected SOAP XML before applying XML navigation. This can help identify whether the issue occurs during the web request or subsequent XML processing.

    4.    Review detailed run logs: Open the Dataflow Gen2 item's Recent runs and download the detailed logs. Microsoft notes that the error information displayed in the pipeline's Dataflow activity might be incomplete.

    Compare the successful run using the parameter's current value with the pipeline-triggered run to identify differences in parameter configuration, request construction, or response handling.

    For more details, please refer to the below Official Microsoft Documentation :
    •  Use public parameters in Dataflow Gen2 (Preview) - Microsoft Fabric | Microsoft Learn
    •  Web.Contents - PowerQuery M | Microsoft Learn
    •  Dataflow activity - Microsoft Fabric | Microsoft Learn

    I hope this helps. Please feel free to reach out if you have any further questions.
    Thank you.