Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backtick as key in json cause error with DataFrames #904

Open
mario-arduini opened this issue Jan 13, 2021 · 0 comments
Open

Backtick as key in json cause error with DataFrames #904

mario-arduini opened this issue Jan 13, 2021 · 0 comments
Labels

Comments

@mario-arduini
Copy link

When using DataFrame operations with structured-json-file and a key contains a backtick ` it leads to an error.

difficult-names.json: (note the last key)
{"1": "one", "include spaces": "impressive", "quotes"": "very tricky", "keyToUse" : "1", "backtick" : "oh cmon"} {"1": "two", "include spaces": "amazing", "quotes\"": "unexpected", "keyToUse" : "include spaces", "backtick" : "why?"}

query:
for $i in structured-json-file("difficult-names.json")
let $c := $i."backtick`"
return $c

Expected result:
oh cmon
why

Got:
[ERROR] An error has occurred:
extraneous input 'spaces' expecting {')', ','}(line 1, pos 39)

== SQL ==
SELECT struct(1,backtick``,include spaces,keyToUse,quotes") AS i` FROM assignment
---------------------------------------^^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants