Remove imported data

Hi!

Just tried Retool today for the first time. When logging in I choose the "Build a simple app using a CSV" option and imported a file. As far as I understand, this file was transformed to a Postgre SQL database.

I want to permanently delete all information in this database and replace it with a new data that better suit my testing needs.

How do I go about this? Thank you!

Hey there @j_a_123!

You might want to try connecting to Retool Database as a resource! That gives you your own personal DB that you can edit either via SQL queries or through the built-in UI :slightly_smiling_face:

The docs I linked go into a lot more detail, can you let me know if it seems like that could work?

Hi,

Thanks for the answer. However, not sure if we misunderstood each other. I want to make sure that the files I’ve uploaded so far (2 or 3 as of now) is permanently deleted from the Retool application. That way I can upload another file when needed.

Can you help me with that?

Thanks for the answer. However, not sure if we misunderstood each other. I want to make sure that the files I’ve uploaded so far (2 or 3 as of now) is permanently deleted from the Retool application. That way I can upload another file when needed.

Can you help me with that?

Hmm... Retool should create a new table in the onboarding_db resource that holds the data from your CSV. If you want to delete it you should be able to run drop table YOUR_TABLE_NAME in SQL mode for that resource.

**Be super careful doing so though!**

You don't want to accidentally delete the wrong table :grimacing:

As a longer-term solution though, I definitely recommend exploring RetoolDB! With it you can also create new tables from CSV files:

You can also generate a form from any table you've created there!

Hopefully that answers your question but let me know if I'm still off-base :sweat_smile:

Hi,

Thanks for this. However, I can't see any rows at all in the table. Am I doing something wrong?

Do you have some sample data in a CSV with the same structure as the one you're using that we could take a look at?

Edit & heads up:
The "Build a simple app using a CSV" option will actually be getting removed from the learning page starting next week. It currently uses some outdated features and the dev team wants the experience to be better for folks just starting with Retool.

They're also looking to add additional ways to jump-start your app building from a CSV :slightly_smiling_face:

Hi Kabirdas,

I loved the idea with Retool but to be honest, it’s getting a bit frustrating since the only thing I want is to permanently delete the data I’ve uploaded. The Support has been quick throughout, but unfortunately, no one has been able to provide me with the step by step to do it (or done it for me).

I don’t know how delete from the onboarding_db is done and I can’t delete the whole database (even though the option is available):

Please help me with this and I will make sure to evaluate Retool once more, otherwise it won’t be an option for us. Thank you!

Ahh sorry for not being clearer earlier!

First, you'll want to find the name of the table that was created when you generated your app. This is likely easiest to do in the app that was generated since the queries there should reference the table:

Once you have the table name, create a new SQL query that also uses the onboarding_db resource:

Then, in SQL mode you'll want to write the query drop table YOUR_TABLE_NAME and hit "Run":

That should delete the table in the onboarding database that has all your data. To check this you can try refreshing the database schema:

All the existing queries that reference that table should stop working as well. Let me know if that works!

Thank you! That seems to have worked.