'How can I use square brackets in a mapping dataflow path?
I'm trying read a file from a directory that contains square brackets in the path using a mapping dataflow in Azure Synapse, like this:
/path/to/[a].[b]/some/file/*.csv
If I enter the path exactly as shown above, the dataflow will "import" the schema from the file, but no data will be displayed. If I rename the directory and remove the square brackets, the file(s) can be read in as expected.
/path/to/a.b/some/file/*.csv
I've tried using a backtick with the brackets and escaping them with a single or double backslash \
, but nothing has worked. I know Spark can read in a directory like this if the path looks like /path/to/\[a\].\[b\]/some/file/*.csv
, but if I enter a string that looks like that, Synapse complains about a token recognition error. If I enter double backslashes, like /path/to/\\[a\\].\\[b\\]/some/file/*.csv
, the I get the same behavior as not including them at all.
I found this and it helps explain the issue, but there isn't a solution.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|