Unexpected Character @ when using JSON Stringify that works in SQL Server

I am attempting to upload a file, translate the JSON into a table format, and then either upload into Azure or do direct query comparisons within Retool. I have the file uploading, then a transformer changes the data to Stringify and ends up in this query (copied directly from the left panel under query):

EXECUTE TablesFromJSON @TheJSON= N'[{"ArchticsID":"117861","Import":"20210629 Season Ticket Holder"},{"ArchticsID":"3001803","Import":"20210629 Season Ticket Holder"},{"ArchticsID":"114017","Import":"20210629 Season Ticket Holder"},{"ArchticsID":"2176428","Import":"20210629 Season Ticket Holder"},{"ArchticsID":"4797660","Import":"20210629 Season Ticket Holder"},{"ArchticsID":"165720","Import":"20210629 Season Ticket Holder"},{"ArchticsID":"2104818","Import":"20210629 Season Ticket Holder"},{"ArchticsID":"7515502","Import":"20210629 Season Ticket Holder"},{"ArchticsID":"11122791","Import":"20210629 Season Ticket Holder"},{"ArchticsID":"4949977","Import":"20210629 Season Ticket Holder"}]'

It runs correctly in Azure, but gives a "JSON text is not properly formatted. Unexpected character '@' is found at position 0." when run in Retool. What am I missing?

@RCarlson32 have you tried escaping the @ character?

@justin - one would think I know how to do that, but unfortunately I can't figure out how to do that even after some Googling. Any assistance there?

Hey @RCarlson32 , sorry for the late reply. I don't think you need escape the @ Symbol. I would try this though -- can you write the query as this (getting rid of N' ... ')

EXECUTE TablesFromJSON @TheJSON={{ StringifyFileJSON.value }}
1 Like

That did it @william-retool! Apologies on such a simple change.

Awesome! Glad it worked :slight_smile: .