Hi All, Is it possible to run xml import via the command line? Thanx
_______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
Hello Fred,
Fred Forester wrote: > > Is it possible to run xml import via the command line? I am needing to do the same thing. I have an idea how this can be achieved although I am sure there must be a more elegant way: I need to update the Product and ProductCategory data on a regular basis and am intending to schedule an XML batch import every x hours. - add a new reader to framework/entity/config/entityengine.xml: <read-data reader-name="dynamic"/> - associate XML file with new reader in applications/ecommerce/ofbiz-component.xml: <entity-resource type="data" reader-name="dynamic" loader="main" location="data/Product.xml"/> - copy XML file into applications/ecommerce/data - execute batch import: java -jar ofbiz.jar -install -readers=dynamic Regards/Gruß, Tarlika Elisabeth Schmitz _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
I think this has been sent to the lists before, but it comes from a comment in the EntityDataLoadContainer.java file. Here are all of the arguments and some example for the install (data loader) process. install arguments: readers (none, all, seed, demo, ext, etc - configured in entityengine.xml and associated via ofbiz-component.xml) timeout (transaction timeout default 7200) delegator (overrides the delegator name configured for the container) group (overrides the entity group name configured for the container) dir (imports all XML files in a directory) file (import a specific XML file) Example: $ java -jar ofbiz.jar -install -readers=seed,demo,ext -timeout=7200 - delegator=default -group=org.ofbiz $ java -jar ofbiz.jar -install -file=/tmp/dataload.xml -David On Aug 18, 2005, at 8:42 AM, T E Schmitz wrote: > Hello Fred, > > Fred Forester wrote: > >> Is it possible to run xml import via the command line? >> > > I am needing to do the same thing. I have an idea how this can be > achieved although I am sure there must be a more elegant way: > > I need to update the Product and ProductCategory data on a regular > basis and am intending to schedule an XML batch import every x hours. > > - add a new reader to framework/entity/config/entityengine.xml: > <read-data reader-name="dynamic"/> > > - associate XML file with new reader in applications/ecommerce/ > ofbiz-component.xml: > <entity-resource type="data" reader-name="dynamic" > loader="main" location="data/Product.xml"/> > > - copy XML file into applications/ecommerce/data > > - execute batch import: > java -jar ofbiz.jar -install -readers=dynamic > > > > Regards/Gruß, > > Tarlika Elisabeth Schmitz > _______________________________________________ > Users mailing list > [hidden email] > http://lists.ofbiz.org/mailman/listinfo/users > _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users smime.p7s (3K) Download Attachment |
Hello David,
David E. Jones wrote: > install arguments: > readers (none, all, seed, demo, ext, etc - configured in > entityengine.xml and associated via ofbiz-component.xml) > timeout (transaction timeout default 7200) > delegator (overrides the delegator name configured for the container) > group (overrides the entity group name configured for the container) > dir (imports all XML files in a directory) > file (import a specific XML file) This has really been very helpful! Thanks. There's just one wee problem I am encountering with this periodical external data import: I can't see a means of nulling out nullable fields. For instance, product.description might have a value and should get a new value of null through the import. Any ideas? > On Aug 18, 2005, at 8:42 AM, T E Schmitz wrote: > >> Fred Forester wrote: >> >>> Is it possible to run xml import via the command line? >>> >> >> I am needing to do the same thing. I have an idea how this can be >> achieved although I am sure there must be a more elegant way: >> >> I need to update the Product and ProductCategory data on a regular >> basis and am intending to schedule an XML batch import every x hours. >> >> - add a new reader to framework/entity/config/entityengine.xml: >> <read-data reader-name="dynamic"/> >> >> - associate XML file with new reader in applications/ecommerce/ >> ofbiz-component.xml: >> <entity-resource type="data" reader-name="dynamic" loader="main" >> location="data/Product.xml"/> >> >> - copy XML file into applications/ecommerce/data >> >> - execute batch import: >> java -jar ofbiz.jar -install -readers=dynamic _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
On Aug 19, 2005, at 9:02 AM, T E Schmitz wrote: > There's just one wee problem I am encountering with this periodical > external data import: I can't see a means of nulling out nullable > fields. For instance, product.description might have a value and > should get a new value of null through the import. > > Any ideas? It should do that when you use an empty attribute (ie description=""). If it isn't doing that, let me know and I'll look into it. -David _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
David E. Jones wrote:
> > On Aug 19, 2005, at 9:02 AM, T E Schmitz wrote: > >> There's just one wee problem I am encountering with this periodical >> external data import: I can't see a means of nulling out nullable >> fields. For instance, product.description might have a value and >> should get a new value of null through the import. > > It should do that when you use an empty attribute (ie description=""). Nope. description="" is ignored and the field retains the old value. I am using rev 5274. -- Kind Regards, Tarlika Elisabeth Schmitz _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
Hi Tarlika,
could you please create a Jira issue for this? Thanks for your help, Jacopo T E Schmitz wrote: > David E. Jones wrote: > >> >> On Aug 19, 2005, at 9:02 AM, T E Schmitz wrote: >> >>> There's just one wee problem I am encountering with this periodical >>> external data import: I can't see a means of nulling out nullable >>> fields. For instance, product.description might have a value and >>> should get a new value of null through the import. >> >> >> It should do that when you use an empty attribute (ie description=""). > > > Nope. description="" is ignored and the field retains the old value. > > I am using rev 5274. > _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
Jacopo Cappellato wrote:
> could you please create a Jira issue for this? Will do. I filed a few issues this week - looks like I'm forever complaining ;-) > T E Schmitz wrote: > >> David E. Jones wrote: >> >>> >>> On Aug 19, 2005, at 9:02 AM, T E Schmitz wrote: >>> >>>> There's just one wee problem I am encountering with this periodical >>>> external data import: I can't see a means of nulling out nullable >>>> fields. For instance, product.description might have a value and >>>> should get a new value of null through the import. >>> >>> >>> >>> It should do that when you use an empty attribute (ie description=""). >> >> >> >> Nope. description="" is ignored and the field retains the old value. >> -- Regards/Gruß, Tarlika Elisabeth Schmitz _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
Issue reporting is very important, so thanks for all your help!
Jacopo T E Schmitz wrote: > Jacopo Cappellato wrote: > >> could you please create a Jira issue for this? > > > Will do. > I filed a few issues this week - looks like I'm forever complaining ;-) > > >> T E Schmitz wrote: >> >>> David E. Jones wrote: >>> >>>> >>>> On Aug 19, 2005, at 9:02 AM, T E Schmitz wrote: >>>> >>>>> There's just one wee problem I am encountering with this >>>>> periodical external data import: I can't see a means of nulling >>>>> out nullable fields. For instance, product.description might have >>>>> a value and should get a new value of null through the import. >>>> >>>> >>>> >>>> >>>> It should do that when you use an empty attribute (ie description=""). >>> >>> >>> >>> >>> Nope. description="" is ignored and the field retains the old value. >>> > _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
Free forum by Nabble | Edit this page |