Azure Data Factory Expression Builder string formatting Error: unrecognised token (new line)

Viewed 1060

I have a Mapping Data Flow, where I want to use a custom SQL query for the Source, but I cannot break it on multiple lines, I get an error stating:

token recognition error at: ''

If I remove the newline and put the whole query on a single line it works, but it looks bearly readable. I would like to preserve the query formatting.

Does anyone have an idea how to do this?

LE the same happens with a simple statement like

select
1

enter image description here

This is how it looks in ADF: enter image description here enter image description here

2 Answers

You cannot use CTEs in ADF data flow source queries, that's the issue.

You can enter a query directly into the SQL Query box as multi-lines (see image). You only need to use the expression builder or dynamic content if you are going to use expressions or parameters.

enter image description here

Related