Bug 349706 - Add support for importing values of Object type from CSV
Summary: Add support for importing values of Object type from CSV
Status: CONFIRMED
Alias: None
Product: KEXI
Classification: Applications
Component: Migration/Import/Export (show other bugs)
Version: 2.9.5
Platform: Arch Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: Kexi Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-29 08:35 UTC by Albrecht Will
Modified: 2016-03-04 11:25 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
object in DB1.jpg (10.39 KB, image/jpeg)
2015-06-29 17:42 UTC, Albrecht Will
Details
object in DB2.jpg (22.92 KB, image/jpeg)
2015-06-29 17:42 UTC, Albrecht Will
Details
exporting a picture to csv.jpg (399.85 KB, image/jpeg)
2015-06-30 08:17 UTC, Albrecht Will
Details
Selecting properties during import (49.69 KB, image/jpeg)
2016-02-22 20:44 UTC, Albrecht Will
Details
Kexi 2.9.11: Import table from external file (ODS for that matter but importing from mysql works too), Object type is present (40.29 KB, image/png)
2016-02-22 22:27 UTC, Jarosław Staniek
Details
The same Kexi: imported table; the BOOTH column is empty here but at least can be filled with values using mouse. (53.99 KB, image/png)
2016-02-22 22:29 UTC, Jarosław Staniek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Albrecht Will 2015-06-29 08:35:00 UTC
importing from csv ist the easiest way, but in the last version (2.9.5) I miss the option for importing an object. I had to use import from table that is not as well as importing from csv.

Reproducible: Always
Comment 1 Jarosław Staniek 2015-06-29 14:44:07 UTC
Thanks for the question. I am unsure what do 'importing an object' means. Object type? Please provide screenshots if applicable.
Comment 2 Albrecht Will 2015-06-29 17:42:13 UTC
Created attachment 93407 [details]
object in DB1.jpg

Am Montag, 29. Juni 2015, 14:44:07 schrieben Sie:
> https://bugs.kde.org/show_bug.cgi?id=349706
> 
> Jarosław Staniek <staniek@kde.org> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
> CC|                            |staniek@kde.org
> 
> --- Comment #1 from Jarosław Staniek <staniek@kde.org> ---
> Thanks for the question. I am unsure what do 'importing an object' means.
> Object type? Please provide screenshots if applicable.

may a cut-out explain it?
Albrecht
Comment 3 Albrecht Will 2015-06-29 17:42:14 UTC
Created attachment 93408 [details]
object in DB2.jpg
Comment 4 Jarosław Staniek 2015-06-29 21:43:09 UTC
Do you want to import fields of 'Object' type, i.e. binaries, for example images when importing from CSV? 
If so we need some assumptions, e.g. it's best if the CSV was created by Kexi or if you assure the the object's data encoded in CSV is in expected format. CSV specifications (if there are any) do not say anything about storing binaries :)
If we agree on how they are stored in CSV, then we're closer to a solution.
For example https://en.wikipedia.org/wiki/Uuencoding can be used.
Comment 5 Albrecht Will 2015-06-30 08:17:22 UTC
Created attachment 93427 [details]
exporting a picture to csv.jpg

Hi Jaroslaw,

my very first intention during the import was getting the right type for a 
datafield to incorporate pictures later by hand. It is very important because 
every change of a field-type deletes all datas.
(In my very short test-data-base inserting by hand was possible.)

(For the following sentence you must know, I have 0,5% knowlegde of SQL)
Would I take over the real database of more then 2000 rows, and I would do any 
mistake or wanted to extend or change the DB, I would love to have a tool to 
store datas without loss and manipulate them in the table-format (what program 
ever).

Now you remark uuencoding!
First I had to infom myself. Then I controlled the output of an cvs-exported 
picture-field. If you look at the appendix - it seems the txt needs only an 
order ...  If you could do this, it would be great.:-)

I think, storing  a l l  datas in a csv format (that you can read, print and 
store for 100 and more years) is also an advantage of Open Source. 2515 you 
can reconstruct the DB's content.

Albrecht

Am Montag, 29. Juni 2015, 21:43:09 schrieben Sie:
> https://bugs.kde.org/show_bug.cgi?id=349706
> 
> Jarosław Staniek <staniek@kde.org> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
> Status|UNCONFIRMED                 |NEEDSINFO
>          Resolution|---                         |WAITINGFORINFO
> 
> --- Comment #4 from Jarosław Staniek <staniek@kde.org> ---
> Do you want to import fields of 'Object' type, i.e. binaries, for example
> images when importing from CSV?
> If so we need some assumptions, e.g. it's best if the CSV was created by
> Kexi or if you assure the the object's data encoded in CSV is in expected
> format. CSV specifications (if there are any) do not say anything about
> storing binaries :)
> If we agree on how they are stored in CSV, then we're closer to a solution.
> For example https://en.wikipedia.org/wiki/Uuencoding can be used.
Comment 6 Christoph Feck 2015-07-17 16:23:22 UTC
Jarosław, does comment #5 provide the requested information? Please set the bug status.
Comment 7 Jarosław Staniek 2015-07-17 16:59:28 UTC
I've set it as a wishlist.
Comment 8 Albrecht Will 2016-02-22 20:00:10 UTC
I use now kexi 2.9.11, the reported problem about importing Datas is bigger then in the past. The import of a cvs file works nearly smooth until the point, when I come to a column for "objects" (an exported picture) If I want to change it, there is no chance to select "object".
In the past I therefore imported a table, because the selection "object" works. But this time is a huge irritation. During the import kexi reads all columns as text (integer, date,...). If you try to change one property, all other columns get the same poperty. Here you can select the property "object".

Even it is not yet possible to handle pictures during import and export, you must have at least the possibility to assign objects by hand after an import.
Comment 9 Jarosław Staniek 2016-02-22 20:14:29 UTC
Thank you for the detailed update Albrecht. I will analyze the impact and possibilities.
Comment 10 Jarosław Staniek 2016-02-22 20:26:30 UTC
> The import of a cvs file works nearly smooth until the point, when I come to a column for "objects" (an exported picture) If I want to change it, there is no chance to select "object". 

Where exactly you were able to select the "object" type?

> In the past I therefore imported a table, because the selection "object" works. But this time is a huge irritation. During the import kexi reads all columns as text (integer, date,...). If you try to change one property, all other columns get the same poperty. Here you can select the property "object". 

Is step by step reproduction possible, please? I am not quite sure if you mean the csv importer or the table designer. Thanks!
Comment 11 Albrecht Will 2016-02-22 20:44:04 UTC
> Where exactly you were able to select the "object" type?
-----------
If using the import from a table not for cvs.
-----------

> Is step by step reproduction possible, please? I am not quite sure if you
> mean the csv importer or the table designer. Thanks!
-------------
It ist not the designer, but importer
look at the appendix.
Comment 12 Albrecht Will 2016-02-22 20:44:45 UTC
Created attachment 97362 [details]
Selecting properties during import
Comment 13 Jarosław Staniek 2016-02-22 21:00:10 UTC
Regarding the  attachment 97362 [details]. Was there ever the "object" type in the combo box?
Comment 14 Albrecht Will 2016-02-22 21:59:55 UTC
Yes, please try to import a table.
Comment 15 Jarosław Staniek 2016-02-22 22:27:08 UTC
Created attachment 97365 [details]
Kexi 2.9.11: Import table from external file (ODS for that matter but importing from mysql works too), Object type is present
Comment 16 Jarosław Staniek 2016-02-22 22:29:23 UTC
Created attachment 97366 [details]
The same Kexi: imported table; the BOOTH column is empty here but at least can be filled with values using mouse.
Comment 17 Albrecht Will 2016-03-03 09:30:19 UTC
In kexi 2.9.11 i can choose in the table an object (picture) and store it. Then there you can see a thumbnail in the table. During the session the picture is shown in my form. Closing kexi and starting it again, the form does not show the picture !!
Adopted, you can improve it, then there is again the reported import-problem for objects.
My suggestion:
The current import-problem for objects (from csv) could be avoided if you can exclude some rows, for example excluding an object-row. Then there is the opportunity to insert an object by hand.
Could you make this sooner?
Comment 18 Jarosław Staniek 2016-03-03 09:51:15 UTC
> In kexi 2.9.11 i can choose in the table an object (picture) and store it. Then there you can see a thumbnail in the table. 
> During the session the picture is shown in my form. 
> Closing kexi and starting it again, the form does not show the picture !!

Hi,
If this happens, that's separate bug. Please report it separately. Thanks.

> The current import-problem for objects (from csv) could be avoided if you can exclude some rows,
>  for example excluding an object-row. Then there is the opportunity to insert an object by hand.

Good idea, please report a wish for that, OK?
Comment 19 Jarosław Staniek 2016-03-04 11:25:11 UTC
OK, reported https://bugs.kde.org/show_bug.cgi?id=360026 "Add option to insert arbitrary empty columns on CSV importing"