My problem is,
In my scenerio, the first module is watching the spreadsheet and giving new entries in every 15 min.
Second module is converting those new entries which is coming from the google spreadsheet to a .csv format eg: if data is aniket, mumbai then csv module will convert this data into “aniket”, “mumbai”.
Now I got the new entries in .csv format and now I want to update those data into a .csv file so thats way, I am checking example.csv file is present in the google drive or not, if not then I am creating one example.csv file and uploading this .csv file in the google drive, and if file is present in the google drive then first I am taking those old data which is already present in google drive with new entries eg: old data + new data. and the I am uploading a file eg: example.csv file with updated data and removing old .csv file from google drive.
This is exactly I am doing, but is there any better way to handle this scenerio.
So I am explaining my scenerio,
New data will come in every 15 min from the google spreadsheet then If .csv file is present in the google drive then dont create file just add the previous data and if .csv file is not present in the google drive then first create one .csv file and then add data. and keep in mind the file name should be current-date.csv, so every day a new file will create eg: 12/08/2024.csv or 13/08/2024.csv.
In my scenerio whenever a new data is coming from the google sheet then I am downloading previous data from .csv file and uploading new .csv file with download data and new data.
Tell me some suggestions, I can use if file is not present in the google drive then create a new google spreadsheet and then add the data and whenever a new data will come then just append the data with add a row google spreadsheet module. After then at the end of the day convert this spreadsheet data to .csv file and upload this file into the google drive.