I'm tring to dump the result from the changeset to the SQL Server.
I have no issue reading the data from the SQL Server and can insert individual records using Insert in SQL mode. But if I want to use the GUI mode, it shows up this strange error
This is the same error I would encounter if I turn off the 'connect using Windows Auth' when setting up the SQL Server connection in Resource. So I wonder if the GUI mode is hornoring the 'Windows Auth' option.
Btw, i use the Retool self-host 3.58.0 and Windows Auth is the only way my organization allows to access the database.
What should I do to bulk insert Retool records to SQL?
Thanks for reaching out! I don't see any known bugs here, but it does seem like an auth issue. Do you happen to know if this was working for you on past versions?
For the second query, we prevent selecting from dynamic values as a security measure described here. You could disable prepared statements to test the query, but ideally we find a solution with prepared statements enabled.
It would help to test a hardcoded query - in GUI and SQL mode - to see if you can get any write queries to run successfully
I have never had a luck with the GUI mode, even on several previous versions during my test. My workaround was to change the way user interact with the data to insert one record at a time or to initiate a workflow to loop thru the changeset on multiple records. However, those are just workarounds and not ideal (slow for workflow specially).
I can successfully write data in SQL mode with hardcoded query. The 'login failed' error only appears when I use GUI mode.
I'm thinking about the 'Windows Auth' because this is the same error if I turn off the 'Connect using Windows Auth' in Resource and test the connection.
Did we get any updates on this by any chance? I am getting the same issue on SQL Server with Windows Auth user. In case it makes any difference, the user only has access to the schema we are writing to (not DB level). It is able to perform updates/inserts when not in GUI mode to the table so it doesn't seem like a perms issue on the UPDATE/INSERT statement.
Thank you for checking on this post! I realized I wasn't super clear about the outcome
Unfortunately, this looks like a Retool bug. Our team hasn't been able to prioritize this bug over other bugs/features. I will follow up here if that changes
you can create an individual resource for the specific db, or else, Retool will default to master db....
but anyway, even you create the db specific resource, this GUI bulk insert still won't work......
a workaround I'm currently using is to feed js data array to workflow and loop it thru, calling a wrapper function that does the insert individually. It's slow (slow mostly because Retool need to create a temporal workflow and initiate it, which adds few seconds overhead each time).
Summarising in case it helps - sounds like the GUI tab is trying to connect using username/password instead of using Windows Auth even for a Windows Auth resource. Conversely the plain SQL tab using the same resource is connecting correctly using Windows Auth.
This is a big issue for us and would really appreciate a bugfix. Thanks!