villebro opened a new pull request #8457: [fix] csv upload when table metadata 
present
URL: https://github.com/apache/incubator-superset/pull/8457
 
 
   ### CATEGORY
   
   Choose one
   
   - [x] Bug Fix
   - [x] Enhancement (new features, refinement)
   - [ ] Refactor
   - [ ] Add tests
   - [ ] Build / Development Environment
   - [ ] Documentation
   
   ### SUMMARY
   Currently the CSV upload feature throws an exception when uploading using 
either `replace` or `append` when the table metadata is present, despite the 
upload having taken place. This PR changes how CSV uploads:
   
   Metadata exists:
   ❌ Table **exists** in the target database and user has selected `fail` 
upload mode: an exception is thrown (=nothing is created/changed).
   ✅ Table **exists** in the target database and user has selected `append` or 
`replace` upload mode: CSV data is appended/replaced to the target table.
   ✅ Table **does not exist** in the target database and user has selected 
`fail`, `append` or `replace` upload mode: target table with CSV data is 
created.
   
   Metadata does not exist:
   ❌ Table **exists** in the target database and user has selected `fail` 
upload mode: an exception is thrown (=nothing is created/changed).
   ✅ Table **exists** in the target database and user has selected `append` or 
`replace` upload mode: metadata created, CSV data is appended/replaced.
   ✅ Table **does not exist** in the target database and user has selected 
`fail`, `append` or `replace` upload mode: metadata created, target table with 
CSV data is created.
   
   Furthermore, the extension `tsv` is added to `ALLOWED_EXTENSIONS`, as I feel 
it is nowadays a commonly accepted extension for tab separated csv files.
   
   ### TEST PLAN
   Tested all possible combinations locally.
   
   ### ADDITIONAL INFORMATION
   - [x] Has associated issue: closes #8451
   - [ ] Changes UI
   - [ ] Requires DB Migration.
   - [ ] Confirm DB Migration upgrade and downgrade tested.
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   ### REVIEWERS
   @pengyejun @willbarrett 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to