Forum Discussion

merganzeruncle's avatar
merganzeruncle
Frequent Visitor
3 months ago
Solved

Dataflow Gen2 w/ Variable Library - variable resolves but fails in destination query

I'm trying to create a Dataflow Gen2 that uses a variable library to remap the destination lakehouse between stages of a deployment pipeline. I followed these two guides: https://learn.microsoft.com...
  • merganzeruncle's avatar
    merganzeruncle
    3 months ago

    Update - this was the issue. My query that got the variable value used the Variable.Value function - this was the whole script (my variable library name is just called "Env"):

    Variable.Value("$(/**/Env/WorkspaceId)")

    This was returning a table, not a scalar. When I tried to convert the output to lowercase as suggested, this caused an error, which tipped me off that it was returning a table.

    My variable query had staging enabled (see below) by default. I read that the Variable.Value function returns a single-column table for staging queries, so I turned off staging and this resolved the issue.