...
The available actions are :
<create>
...
:
...
The entity
...
loading
...
mechanism
...
checks
...
all
...
entity
...
elements
...
present
...
under
...
this
...
action
...
and
...
if
...
a
...
research
...
by
...
the
...
primary
...
returns
...
empty,
...
creates
...
it.
...
Otherwise
...
nothing
...
is
...
done.
<create-update>
...
:
...
The entity
...
loading
...
mechanism
...
checks
...
all
...
entity
...
elements
...
present
...
under
...
this
...
action
...
and
...
if
...
a
...
research
...
by
...
primary
...
key
...
return
...
empty,
...
creates
...
it.
...
Otherwise
...
it
...
updates
...
the
...
existing
...
element
...
with
...
the
...
given
...
field
...
value.
...
<create-replace>
...
:
...
The entity
...
loading
...
mechanism
...
checks
...
all
...
entity
...
elements
...
present
...
under
...
this
...
action
...
and
...
if
...
a
...
research
...
by
...
primary
...
key
...
return
...
empty,
...
creates
...
it.
...
Otherwise
...
it
...
replaces
...
the
...
existing
...
element
...
with
...
the
...
given
...
field
...
value.
...
If
...
a
...
field
...
is
...
present
...
in
...
the
...
database
...
but
...
not
...
on
...
xml
...
definition,
...
it
...
will
...
be
...
set
...
to
...
empty.
...
<delete>
...
:
...
The entity
...
loading
...
mechanism
...
checks
...
all
...
entity
...
elements
...
present
...
under
...
this
...
action
...
and
...
if
...
a
...
research
...
by
...
primary
...
key
...
return
...
empty,
...
tries
...
to
...
delete
...
it.
...
Warning
...
the
...
foreign
...
keys
...
haven't
...
been
...
tested.
...
So
...
if
...
you
...
broke
...
a
...
database
...
constraint,
...
all
...
operations
...
present
...
in
...
the
...
file
...
will
...
be
...
rolled
...
back.
Here is an example:
Code Block | ||||
---|---|---|---|---|
| ||||
<entity-engine-xml> <create> <Example exampleId="EX13" exampleName="Example 13" exampleTypeId="INSPIRED" statusId="EXST_IN_DESIGN"/> <Example exampleId="EX14" exampleName="Example 14" exampleTypeId="INSPIRED" statusId="EXST_IN_DESIGN"/> </create> <create-replace> <Example exampleId="EX12" exampleName="Example 12 after replace" exampleTypeId="INSPIRED" statusId="EXST_IN_DESIGN"/> </create-replace> <create-update> <Example exampleId="EX12" exampleName="Example 11 after update" exampleTypeId="INSPIRED" statusId="EXST_IN_DESIGN"/> </create-update> <delete> <Example exampleId="EX09"/> </delete> <Example exampleId="EX10" exampleName="Example 10 after update"/> </entity-engine-xml> |
...
Load your data files in OFBiz
To load, you have three four possibilities
By entity XML import reader : on your component indicate to load your files by with ext reader. When you want load your data, run ./ant load-ext from your OFBIz home directory.
For instance in your component/ofbiz-component.xml:Code Block language xml <entity-resource type="data" reader-name="ext" loader="main" location="data/MyImportData.xml"/>
- See How to preparing data for more information.
Directly from webtools in OFBiz, go to
https://localhost:8443/webtools/control/entityImport to load file by file or copy/paste text
https://localhost:8443/webtools/control/EntityImportDir to load a directory content
- Call the OFBiz service importEntityFileDirectory if you have an automation process
text
https://localhost:8443/webtools/control/EntityImportDir to load a directory content
- Call the OFBiz service importEntityFileDirectory if you have an automation process
Directly from command line using Gradle command:
Code Block gradlew "ofbiz --load-data file=data/myimportdata.xml"
Note: The data file name should be lowercase only.
For all the files in the given directory:
Code Block gradlew "ofbiz --load-data dir=data"
Use the OFBiz's Data File Tools to import a CSV or tab-delimited file
...
Here is a sample product import file row. This is a tab delimited file. If you prefer CSV (Comma Separated Values), change the delimiter to "," and the text-delimiter to """ in the XML below.
Code Block |
---|
PRODUCT_ID SKU TITLE CATEGORIES IMAGE_URL BRAND DESCRIPTION DETAILS WEIGHT DIMENSIONS GOING REFURB FREIGHT ITEM_NAME MAP PRICE MSRP QTY_AVAIL EST_AVAIL EXPECTED_SHIPPING_COST EXPECTED_DROP_SHIP_FEE UPC ITEM_ID 100 213 Atwater Carey EMT Shears leisure and sport|camping/hiking|accessories http://images.doba.com/products/2/213.jpg Atwater Carey The choice of EMTs worldwide, the 5-1/2'' trauma shears contained in all Pro Series kits or sold separately features an oversized rivet to overcome the rigors of backcountry emergencies. Identified by the bright orange handles, these shears will cut through cloth, plastic, and even light-gauge metal.<br><br> 0.100000002 N N N Atwater Carey EMT Shears 0 3.92 4.99 6 0000-00-00 6.63 2 7.39657E+11 100 |
...