You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/11/12 09:22:31 UTC

[GitHub] [incubator-superset] Sascha-Gschwind opened a new issue #8543: [SIP] Proposal for Improvement on CSV Upload

Sascha-Gschwind opened a new issue #8543: [SIP] Proposal for Improvement on CSV Upload
URL: https://github.com/apache/incubator-superset/issues/8543
 
 
   ## [SIP] Proposal for Improvement on CSV Upload
   
   ### Motivation
   
   For non-technical users the process to upload a CSV can be a bit complicated since it is very verbose. If there is no database connection that has "Allow CSV Upload" enabled the user probably does not know what to do exactly.
   
   We want to improve the way CSV data is uploaded that is a bit less verbose and supports creating new SQLite databases. It will also allow upload via Drag&Drop. If no database connection with "Allow CSV Upload" exists it should automatically create and use a new SQLite database connection.
   
   ### Proposed Change
   
   We will replace the current form with a React-based form that supports Drag&Drop. It shows the most important form entries and has an "Advanced Options" menu where you can still access all the other fields that aren't needed most of the time.
   
   Once they click "Save" the following mechanism should be executed:
   1. Send the form-data to a backend API endpoint.
   2. The backend API endpoint checks if it should create a new database or load the CSV to the existing one.
   3. If a new database has to be created it checks if a file with that name already exists and informs the user if that is the case. Otherwise it will create the database file and add a database connection.
   4. Finally the CSV-Upload is completed (same way it is done now)
   
   In case of creating a new database, if anything goes wrong during the process, we try deleting the database and clean up the created files.
   
   ### New or Changed Public Interfaces
   
   * There will be a new form for the "CSV to Database configuration" in React exposed at "/superset/csvtodatabase"
   * There will be a new API endpoint "/superset/csvtodatabase/add" that can also create an SQLite database and an SQLite database connection if needed. The endpoint will still be able to handle the CSV Upload as usual.
   
   ### New dependencies
   
   * We **do not need** any new dependencies
   
   ### Migration Plan and Compatibility
   
   It would be beneficial if a chapter describing the process of uploading a CSV file would be added to the existing documentation.
   Since not every browser supports Drag&Drop a fallback will be implemented showing the usual file upload input.
   
   ### Rejected Alternatives
   
   * We considered changing the current CSV upload mechanism but since the flask-forms are very limited and we wanted to implement a Drag&Drop chose to implement it in React.
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org