Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0033875 | Openbravo ERP | Y. DBSourceManager | public | 2016-09-01 13:32 | 2016-12-16 18:39 |
|
Reporter | AugustoMauch | |
Assigned To | AugustoMauch | |
Priority | normal | Severity | major | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 3.0PR17Q1 | |
Merge Request Status | |
Review Assigned To | alostale |
OBNetwork customer | No |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0033875: Importing/Exporting sample data using PostgreSQL's COPY instead of current XML |
Description | Currently we use XML to export and import Openbravo's sampledata. To export we extract the database contents ourselves and then use ddlutil's DataWriter to export them to database. To import we use the DataReader, that parses the XML en loads the data in the database.
PostgreSQL provides the COPY command [1], using it would have at least two advantages:
- The exported sample data is much smaller since the CSV format has less overhead that XML (one particular uncompressed sampledata weighted 4.5G in XML versus 1.2G in CSV, 147M vs 127M compressed).
- Both the export and import process are much faster. Metrics will be added here when they are available.
Project: http://wiki.openbravo.com/wiki/Projects:Import_Export_Sample_Data_Using_PostgreSQL_Copy [^]
[1] https://www.postgresql.org/docs/9.5/static/sql-copy.html [^] |
Steps To Reproduce | - |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | has duplicate | feature request | 0034094 | | closed | AugustoMauch | Openbravo ERP | Support exporting and importing sampledata using PostgreSQL's COPY | related to | defect | 0034639 | | closed | AugustoMauch | Retail Modules | ExportStoreData class has to be updated after the latest changes done in ExportsampleData | causes | defect | 0034638 | | closed | AugustoMauch | Openbravo ERP | Changing the visibility of DatabaseDataIO.writeDataForTableToXML has broken a job |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2016-09-01 13:32 | AugustoMauch | New Issue | |
2016-09-01 13:32 | AugustoMauch | Assigned To | => AugustoMauch |
2016-09-01 13:32 | AugustoMauch | OBNetwork customer | => No |
2016-09-01 13:32 | AugustoMauch | Modules | => Core |
2016-09-01 13:32 | AugustoMauch | Triggers an Emergency Pack | => No |
2016-10-28 13:47 | AugustoMauch | Relationship added | has duplicate 0034094 |
2016-11-25 17:41 | hgbot | Checkin | |
2016-11-25 17:41 | hgbot | Note Added: 0091859 | |
2016-11-25 17:41 | hgbot | Status | new => resolved |
2016-11-25 17:41 | hgbot | Resolution | open => fixed |
2016-11-25 17:41 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/dbsm-main/rev/492821683ddcdb8f8f43859373169c52abdff39f [^] |
2016-11-25 17:56 | hgbot | Checkin | |
2016-11-25 17:56 | hgbot | Note Added: 0091860 | |
2016-11-25 17:56 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/devel/dbsm-main/rev/492821683ddcdb8f8f43859373169c52abdff39f [^] => http://code.openbravo.com/erp/devel/pi/rev/f169cafac730141372142a78fbc68e040c12b7c1 [^] |
2016-11-25 17:58 | AugustoMauch | Review Assigned To | => alostale |
2016-11-26 13:57 | AugustoMauch | Relationship added | causes 0034638 |
2016-11-26 14:03 | hgbot | Checkin | |
2016-11-26 14:03 | hgbot | Note Added: 0091864 | |
2016-11-26 14:04 | hgbot | Checkin | |
2016-11-26 14:04 | hgbot | Note Added: 0091866 | |
2016-11-26 14:13 | AugustoMauch | Relationship added | related to 0034639 |
2016-11-30 17:00 | hgbot | Checkin | |
2016-11-30 17:00 | hgbot | Note Added: 0091936 | |
2016-11-30 17:03 | hgbot | Checkin | |
2016-11-30 17:03 | hgbot | Note Added: 0091937 | |
2016-12-02 08:41 | alostale | Description Updated | bug_revision_view_page.php?rev_id=13949#r13949 |
2016-12-02 08:41 | alostale | Note Added: 0092005 | |
2016-12-02 08:41 | alostale | Status | resolved => closed |
2016-12-02 08:41 | alostale | Fixed in Version | => 3.0PR17Q1 |
2016-12-16 18:39 | hudsonbot | Checkin | |
2016-12-16 18:39 | hudsonbot | Note Added: 0092663 | |
2016-12-16 18:39 | hudsonbot | Checkin | |
2016-12-16 18:39 | hudsonbot | Note Added: 0092665 | |
2016-12-16 18:39 | hudsonbot | Checkin | |
2016-12-16 18:39 | hudsonbot | Note Added: 0092672 | |
Notes |
|
(0091859)
|
hgbot
|
2016-11-25 17:41
|
|
Repository: erp/devel/dbsm-main
Changeset: 492821683ddcdb8f8f43859373169c52abdff39f
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Fri Nov 25 17:37:31 2016 +0100
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/492821683ddcdb8f8f43859373169c52abdff39f [^]
Fixes issue 33875: Sample data can be exported/imported with pgsql copy format
The export.sample.data ant task can now export the sample data in PostgreSQL`s copy format when the data is stored in a PostgreSQL database, see http://wiki.openbravo.com/wiki/How_to_export_sample_data [^]
---
M src/org/apache/ddlutils/io/DatabaseDataIO.java
M src/org/openbravo/ddlutils/task/DatabaseUtils.java
M src/org/openbravo/ddlutils/task/ExportSampledata.java
M src/org/openbravo/ddlutils/task/ImportSampledata.java
M src/org/openbravo/ddlutils/util/OBDataset.java
M src/org/openbravo/ddlutils/util/OBDatasetTable.java
A src/org/apache/ddlutils/io/DataSetTableExporter.java
A src/org/apache/ddlutils/io/DataSetTableQueryGenerator.java
A src/org/apache/ddlutils/io/DataSetTableQueryGeneratorExtraProperties.java
A src/org/apache/ddlutils/platform/postgresql/PostgreSqlDatabaseDataIO.java
---
|
|
|
(0091860)
|
hgbot
|
2016-11-25 17:56
|
|
|
|
(0091864)
|
hgbot
|
2016-11-26 14:03
|
|
Repository: erp/devel/dbsm-main
Changeset: 9ee6ed582c36f9a342f3afd2324dfc890ef34239
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Sat Nov 26 14:02:36 2016 +0100
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/9ee6ed582c36f9a342f3afd2324dfc890ef34239 [^]
Fixes issue 34638, related with issue 33875: Reverts method visibility change
The DatabaseDataIO.writeDataForTableToXML method was made private because it was not being used by any class other than DatabaseDataIO inside dbsm, but I failed to notice that it was being used in an external module (Easy Extensible Attributes).
---
M src/org/apache/ddlutils/io/DatabaseDataIO.java
---
|
|
|
(0091866)
|
hgbot
|
2016-11-26 14:04
|
|
Repository: erp/devel/pi
Changeset: 127865df93ddcdb773414120a0bbcae1bb7736c8
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Sat Nov 26 14:03:59 2016 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/127865df93ddcdb773414120a0bbcae1bb7736c8 [^]
Fixes issue 34638, related with issue 33875: Reverts method visibility change
The DatabaseDataIO.writeDataForTableToXML method was made private because it was not being used by any class other than DatabaseDataIO inside dbsm, but I failed to notice that it was being used in an external module (Easy Extensible Attributes).
---
M src-db/database/lib/dbsourcemanager.jar
---
|
|
|
(0091936)
|
hgbot
|
2016-11-30 17:00
|
|
Repository: erp/devel/dbsm-main
Changeset: 6342c7ef4c4b48b6d9605a41eaabfc044b0cd1de
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed Nov 30 15:26:35 2016 +0100
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/6342c7ef4c4b48b6d9605a41eaabfc044b0cd1de [^]
Related with issue 33875: Inlines method to avoid working with closed resultset
The DatabaseDataIO.getDatasetTableDataIterator method, which was only used in one place, returned a Iterator<DynaBean>, which was an iterator of a ResultSet. The problem was that the ResultSet was being closed inside the getDatasetTableDataIterator method, so the returned iterator could not work.
---
M src/org/apache/ddlutils/io/DatabaseDataIO.java
---
|
|
|
(0091937)
|
hgbot
|
2016-11-30 17:03
|
|
Repository: erp/devel/pi
Changeset: 83e12075fade2e0dfff7c6528f879031758f3e8e
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed Nov 30 17:02:36 2016 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/83e12075fade2e0dfff7c6528f879031758f3e8e [^]
Related with issue 33875: Inlines method to avoid working with closed resultset
The DatabaseDataIO.getDatasetTableDataIterator method, which was only used in one place, returned a Iterator<DynaBean>, which was an iterator of a ResultSet. The problem was that the Re
sultSet was being closed inside the getDatasetTableDataIterator method, so the returned iterator could not work.
---
M src-db/database/lib/dbsourcemanager.jar
---
|
|
|
|
code reviewed and tested within project |
|
|
|
|
|
|
|
|
|
|