Selecting schema for CSV upload

Love the tool! Quick question: is it possible to upload CSVs to a specific Postgres schema other than 'public'?
Thanks a bunch!

Hi @ovi! i just checked and right now we only support the public schema unfortunately :frowning:

buut we can change that! would it be a really helpful feature for you?

It would be extremely helpful for us–might end up being the deciding feature that determines whether we go with Retool or another option…

Abdul, thanks so much for you breakneck response time! Makes sense that public is the only one for now, but we sure would love it (like my colleague Zach mentioned)
FWIW we did try using connection string w/ postgresql://address:port/database?currentSchema=schema, so if you’re looking to minimize UI changes perhaps the v1 could be accomplished through such a mechanism?

hahaha, breakneck response time! i love it

i’ll take a look today and scope this out, and get back to you with a timeline

good news! this is a quick fix since we already support multiple schemas on other DBs (e.g. mssql)

it’ll be out on our next deploy (probably tomorrow morning)

Wow Abdul, if you can deliver on rolling this out in your next deploy, I am seriously impressed with Retool’s technical customer support experience. And to echo you and @ovi, your response time HAS been breakneck so far. :slight_smile:
Please continue to keep me and @ovi posted on the postgres multiple schema support deploy!

haha, thank you for the kind words! will ping y’all once our deploy goes out (should roughly be around 10am PST tomorrow morning)

@zach-obrien @ovi it’s deployed now! lmk if it works for you

Hi @abdul-nimeri, I was playing around a little bit with the database editor and the resources tabs.
I entered the connection string in the following form: postgresql://user.password@hostname:5432/mydb?currentSchema=schemaname
Once the connection string was entered in the resources manager, I didn’t receive any error messages, and was able to upload CSVs to the database in the database editor, no problem.
HOWEVER–when I go and check the database, these CSVs still end up in the public schema, not the schema I want, which I named ‘retool’.
Any thoughts as to whether I’m using the correct syntax for the connection string? or whether I need to name the CSV upload a certain way for it to get recognized as needing to be entered into my database’s ‘retool’ schema, rather than its ‘public’ schema?

oh hmm that doesn’t sound right! lemme take a look

hey @zach-obrien, couple clarifying questions:

  • are you creating the table thru the database editor, or does the table already exist?
  • are you using the button that says “Upload CSV and detect conflicts”, or the one that says “Upload CSV and infer schema”?

for whatever reason i couldnt repro when i tried it just now

also FWIW, you don’t need the currentSchema=schemaname in the connection string. sorry shoulda clarified earlier, but the fix i made was to display all tables from all schemas in the db editor. the behavior for the connectionstring hasn’t changed


So, I’m trying to use the “Upload CSV and infer schema” button, and I’m creating the table thru the database editor.

I’m looking to use Retool as a place where those who aren’t technical on my team can upload CSVs to the ‘retool’ table without needing to go into pgAdmin or another tool to create a blank table in the retool schema of our data warehouse.