Search code examples
velo

Automate updating Wix database


How can I automatically update wix database? The are only options to "Import/Export" CSV manually. For example, my computer program generates a CSV file every 6hr and how do I automatically update (replace entirely) the old database from the CSV file on my computer?

I use "to_csv" pandas function to save the dataframe as a CSV, so the generated CSV file will be in the same folder as my ipynb file.


Solution

  • You cannot pull a file from a local drive on your computer/device.

    You can use HTTP Functions to parse and send the .csv file from the external program to your site's API.

    Then, use the truncate() function to clear all data before inserting new data. I would suggest that you use the bulkInsert() function to insert your data.

    However the HTTP Post request has to come from another program/cloud/server. Your Wix Site is not capable of pulling local files.