1

I am using a 'mapping data flow' activity in ADF to extract and load some records. I have created 2 parameters in the data flow activity - table_name, schema_name - which I'm trying to use to make the same activity work for multiple tables.

In the Source Options tab on Source(within data flow activity) I have the following query -

select * from '{$SchemaName}'.'{$TableName}'

I'm getting the following error message when I debug -

{
  "message": "Job failed due to reason: at Source 'source1'(Line 2/Col 11): Column operands are not allowed in literal expressions. Details:at Source 'source1'(Line 2/Col 11): Column operands are not allowed in literal expressions",
  "failureType": "UserError",
  "target": "GetLatestData",
  "errorCode": "DFExecutorUserError"
}

Anyone have any thoughts on what I'm doing wrong?

1
  • Would you mind copy/paste the data flow script for this data flow? Go to the ADF data flow designer and click the Script button. Commented Oct 15, 2020 at 1:17

1 Answer 1

1

Please try this expression:

"select * from {$SchemaName}.{$TableName}"

My test:

1.create two parameters: enter image description here

2.click 'Add dynamic content [Alt+P]' enter image description here

3.type this expression: "select * from {$SchemaName}.{$TableName}" enter image description here

Data preview: enter image description here

Sign up to request clarification or add additional context in comments.

2 Comments

If you think my answer helps you, you could mark it as answer. Thanks a lot.
This does NOT work. I tried the same with my use case "SELECT * FROM PharmacyMaster WHERE NationalProviderIdentifier in ({$parameter1})" and it does not work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.