Import/Export - make Importer work better with joined SQL resultsets

Description

I want to import a table with a subtable and for some of the records there are more than one entries in the subtable.

To do this the main record entries in the csv file have to be empty (according to a freshly exported table and to http://wiki.idempiere.org/en/NF001_ImportCSV).

If I collect my import data from a sql database I do this with a

SELECT ... FROM mainTable LEFT JOIN subTable

In the so extracted SQL-generated import table all lines for one record have equal entries for the main record (not empty entries). Because of this fact it is not easy to import data from an sql query out of a foreign database.

It would be nice if the importer could recognize that all main record's columns are equal to the last row and behave like all columns are empty.

Workaround: After reading the documentation it could be that I can import such a table with the "merge" functionality (have not tried yet) but I feel that what I want is to "import" data and not to "merge". (There are functional differences e.g. if I "import" a record that existed before.) Thats why I think "import" should do the job.

Environment

None

Activity

Show:
Thomas Bayen
June 2, 2013, 8:52 PM

I described my workaround at http://wiki.idempiere.org/en/NF001_ImportCSV#Hints_.26_Tricks in the chapter "Hints & Tricks".

Please can someone confirm that one can use more than one column marked with "/K" as a kind of "joined primary key". I use that for detail tables. This was not documented before and I am afraid to document it when it was not intended.

Carlos Ruiz
December 23, 2019, 10:57 AM

Closing as Potential Idea

Assignee

Unassigned

Reporter

Thomas Bayen

Tested By

None

Components

Fix versions

Affects versions

Priority

Minor
Configure