How to deal with changes in Data Types
- Dominant language
- Rust
- Stars
- 20.8k
- Forks
- 2.1k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 181
Description
**Problem**
I have an excel file that resides in a SharePoint Document library. I have a server-side script that connects to the excel file and extracts data from a specific worksheet. It also determines the best data type for each column. It then creates (if does not exist) a table in a Postgres database and inserts the data. I also schedule a script to run periodically that pretty much does the same as the first upload, except that this time its a refresh of the data. However, it also validates the data types of the columns and updates database table column types accordingly.
So, the question comes when data types change, especially when schema for that table already exists. In the schema the changed column will conflict with the tables data type (in the schema it may have initially been defined as number but in the table it is now a string)
What's the best way to handle this situation?
Contributor guide
Assessment
This issue has not been assessed yet.