Hi Jacques,

Yes, both, but I have problems in step 4:


   1. connect to the Webtools application
   2. go to the "Work With Data Files" screen
   3. enter the path to the your definition file in the "Definition
   Filename or URL" input field
   4. click on the submit button


I have used this file
/opt/apache-ofbiz-16.11.03/framework/datafile/dtd/datafiles.xsd and this

<data-file name="Product" separator-style="delimited" type-code="UTF-8"
    delimiter="&#009;" text-delimiter=""
    description="this takes the product data from doba file"
    has-header="true">
    <record name="Product">
        <field name="productId" ignored="false" type="String"/>
        <field name="primaryProductCategoryId" expression="true"
            default-value="dropShip" type="String"/>
        <field name="productTypeId" expression="true"
            default-value="FINISHED_GOOD" type="String"/>
        <field name="sku" ignored="true" type="String"/>
        <field name="description" ignored="false" type="String"/>
        <field name="categories" ignored="true" type="String"/>
        <field name="image_url" ignored="true" type="String"/>
        <field name="brandName" ignored="false" type="String"/>
        <field name="longDescription" ignored="false" type="String"/>
        <field name="details" ignored="true" type="String"/>
        <field name="weight" ignored="false" type="String"/>
        <field name="weightUomId" expression="true" default-value="WT_lb"
            type="String"/>
        <field name="dimensions" ignored="true" type="String"/>
        <field name="going" ignored="true" type="String"/>
        <field name="refurb" ignored="true" type="String"/>
        <field name="freight" ignored="true" type="String"/>
        <field name="productName" ignored="false" type="String"/>
        <field name="map" ignored="true" type="String"/>
        <field name="price" ignored="true" type="String"/>
        <field name="msrp" ignored="true" type="String"/>
        <field name="quantityIncluded" expression="true" default-value="1"
            type="String"/>
        <field name="quantity" ignored="true" type="String"/>
        <field name="est_avail" ignored="true" type="String"/>
        <field name="expected_shipping_cost" ignored="true" type="String"/>
        <field name="expected_drop_ship_fee" ignored="true" type="String"/>
        <field name="upc" ignored="true" type="String"/>
        <field name="item_id" ignored="true" type="String"/>
        <field name="isVirtual" expression="true" default-value="N"
            type="String"/>
        <field name="isVariant" expression="true" default-value="N"
            type="String"/>
    </record>
</data-file>

but always I get this error  "No <data-file> elements found in
file:/home/user/data-file.xml"

Best regards

2017-11-17 9:30 GMT+00:00 Jacques Le Roux <[email protected]>:

> Le 17/11/2017 à 09:43, Javier H. a écrit :
>
>>
>> On 2017-11-17 08:05, Michael Brohl <[email protected]> wrote:
>>
>>> Hi Javier,
>>>
>>> why not directly export to the OFBiz datafile format?
>>>
>>> Regards,
>>>
>>> Michael
>>>
>>>
>>> Am 17.11.17 um 09:03 schrieb Javier H.:
>>>
>>>> On 2017-11-14 08:21, "Javier H."<[email protected]> wrote:
>>>>
>>>>> On 2017-11-14 08:02, "pierre.gaudin" <[email protected]> wrote:
>>>>>
>>>>>> On 14/11/2017 08:55, Javier H. wrote:
>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> I have to import about 95.000 products into Ofbiz (mysql database).
>>>>>>>
>>>>>>> I can import it to TXT or SQL formats, also to XLS but I get a error
>>>>>>> because max is 65.000 rows.
>>>>>>>
>>>>>>> What format do you recommend for import, TXT or SQL?
>>>>>>>
>>>>>>> Best regards
>>>>>>>
>>>>>>> Hi Javier
>>>>>>
>>>>>> We used to import about 700 000 article for a customer.
>>>>>>
>>>>>> We used XML import via XSLT transformation to do so. I don't think
>>>>>> there
>>>>>> is a limit with xml import.
>>>>>>
>>>>>>
>>>>>> Pierre
>>>>>>
>>>>>> Thank you Pierre,
>>>>>>
>>>>> I think that I can to export to XML, I have to check it.
>>>>>
>>>>> Best regards
>>>>> Hello,
>>>>>
>>>> I have exported the data to an XML file.
>>>>
>>>> Something similar to this:
>>>>
>>>> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
>>>> <RECORDS>
>>>>     <RECORD>
>>>>       <ROW
>>>>         CODE="1308051"
>>>>         DESCR="DEMO PRODUCT"
>>>>         PRICE="5,50"
>>>>         TAX="21"
>>>>         QUANTITY="40"
>>>>         LASTPRICE="4,9"
>>>>         TAXCODE="3"
>>>>         PROVIDER="87"
>>>>         CATEGORY="00099"
>>>>         DATE="01012015"
>>>>       />
>>>>     </RECORD>
>>>>     .....
>>>> </RECORDS>
>>>>
>>>> How can I make the definition file for this?
>>>>
>>>> And how can I ignore the fields that I do not want to import? (For
>>>> example DATE).
>>>>
>>>> Best regards
>>>>
>>>
>>> Hi Michael,
>>>
>> Because I have no idea.
>>
>> https://cwiki.apache.org/confluence/display/OFBIZ/OFBiz%27s+
>> Data+File+Tools
>>
>> I'm testing Data File Tools, I added this "/opt/apache-ofbiz-16.11.03/fr
>> amework/datafile/dtd/datafiles.xsd" to Definition Filename or URL" but I
>> get this error:
>>
>> No <data-file> elements found in file:/opt/apache-ofbiz-16.11.0
>> 3/framework/datafile/dtd/datafiles.xsd
>>
>> Best regards
>>
>> Hi Javier,
>
> Did you follow https://cwiki.apache.org/confluence/display/OFBIZ/OFBiz's+
> Data+File+Tools ?
> Did you have a look at https://cwiki.apache.org/confl
> uence/display/OFBIZ/Handling+of+External+data ?
>
> HTH
>
> Jacques
>
>


-- 
Saludos

Reply via email to