Bug 305505

Summary: Add support for appending CSV data to an existing table
Product: [Applications] KEXI Reporter: Carlos Cámara <carlos.camara>
Component: Migration/Import/ExportAssignee: Oleg Kukharchuk <oleg.kuh>
Status: CLOSED FIXED    
Severity: wishlist CC: iw, staniek
Priority: NOR Flags: staniek: Usability+
Version: 2.5.0   
Target Milestone: 2.7   
Platform: unspecified   
OS: Linux   
URL: http://community.kde.org/Kexi/Migration#Add_support_for_appending_CSV_data_to_an_existing_table
Latest Commit: Version Fixed In: 2.7.0

Description Carlos Cámara 2012-08-20 18:34:47 UTC
At this moment Kexi allows you to import a csv file and creates a new table from it. However, there's no way to only add the data contained in a csv into an existing table. One could argue that you can delete the table and create a new one from the import file but there are a number of cases in which that won't work, for example:

    1. you want to merge data from a table and a csv file with the same structure
    2. you want to import data into a table which is used in queries and/or relations and you do not want to do again that work
    3. one of the CSV fields should be unique. Since there's no way to achieve that, you have to import the CSV and edit the table's design, but (don't know why) the data is deleted as soon as you make any changes into it

Hope anyone can implement a solution for this.

Regards 

Reproducible: Always

Actual Results:  
A new table is created from the CSV file.

Expected Results:  
User should decide whether creating a new table from CSV or just adding data into an existing table
Comment 1 Jarosław Staniek 2012-09-19 15:10:31 UTC
*** Bug 266114 has been marked as a duplicate of this bug. ***
Comment 2 Oleg Kukharchuk 2012-12-15 13:10:04 UTC
Git commit cb692dbe4c69b38a6df3e25328c6c7a522d2c925 by Oleg Kukharchuk.
Committed on 15/12/2012 at 14:04.
Pushed by okukharchuk into branch 'master'.

Implemented import csv data into existing table
REVIEW: 107330
DIGEST: Kexi now can import csv data into an existing table

M  +684  -343  kexi/plugins/importexport/csv/kexicsvimportdialog.cpp
M  +60   -4    kexi/plugins/importexport/csv/kexicsvimportdialog.h

http://commits.kde.org/calligra/cb692dbe4c69b38a6df3e25328c6c7a522d2c925
Comment 3 Carlos Cámara 2013-05-25 18:28:29 UTC
(In reply to comment #2)
> Git commit cb692dbe4c69b38a6df3e25328c6c7a522d2c925 by Oleg Kukharchuk.
> Committed on 15/12/2012 at 14:04.
> Pushed by okukharchuk into branch 'master'.
> 
> Implemented import csv data into existing table
> REVIEW: 107330
> DIGEST: Kexi now can import csv data into an existing table
> 
> M  +684  -343  kexi/plugins/importexport/csv/kexicsvimportdialog.cpp
> M  +60   -4    kexi/plugins/importexport/csv/kexicsvimportdialog.h
> 
> http://commits.kde.org/calligra/cb692dbe4c69b38a6df3e25328c6c7a522d2c925

I am using latest stable version (2.6.3) but I haven't been able to import CSV files into an existing table. Is it really implemented in this version? Should I do something to use this feature?

Thank you
Comment 4 Jekyll Wu 2013-05-25 18:38:46 UTC
(In reply to comment #3)
> I am using latest stable version (2.6.3) but I haven't been able to import
> CSV files into an existing table. Is it really implemented in this version?
> Should I do something to use this feature?
> 
> Thank you

If you visit the web interface of this report,  you will see it is clearly marked as "fixed in 2.7.0"