Christian,
I had not created a bxs script. I was running things from the command line like so. I have discovered a new mode however. I originally started using -I because I was writing scripts that were ignorant of the database to use in order to facilitate using these scripts on a test database later. I found though that for the scripts that have to update the database, an explicit callout to the database in question inside the script was necessary. I accidentally typeo'd the -I TestRestults (note the spelling error) when I called import-and-process.xq, which was successful in updating the database with one file. Below is a test, when I issue a bogus -I, the update is successful. I don't understand what is going on here and I'd like to make my scripts either fully "database name" agnostic or else all of the scripts will have baked in references to TestResults.
C:\Users\joshua.kordani\Documents\ACS>basex BaseX 9.2.2 [Standalone] Try 'help' to get more information.
list
Name Resources Size Input Path ---------------------------------
0 database(s).
create db TestResults
Database 'TestResults' created in 220.32 ms.
list
Name Resources Size Input Path ---------------------------------------- TestResults 0 4570
1 database(s).
quit
See you.
C:\Users\joshua.kordani\Documents\ACS>basex -i TestResults -b dir=TestResults import-all.xq C:/Users/joshua.kordani/Documents/ACS/TestResults/: Updates are not written back.
C:\Users\joshua.kordani\Documents\ACS>basex BaseX 9.2.2 [Standalone] Try 'help' to get more information.
list
Name Resources Size Input Path ---------------------------------------- TestResults 0 4570
1 database(s).
quit
Have a nice day.
C:\Users\joshua.kordani\Documents\ACS>basex -i bogus -b dir=TestResults import-all.xq
C:\Users\joshua.kordani\Documents\ACS>basex BaseX 9.2.2 [Standalone] Try 'help' to get more information.
list
Name Resources Size Input Path ------------------------------------------ TestResults 8 251589
1 database(s).
-----Original Message----- From: Christian GrĂ¼n christian.gruen@gmail.com Sent: Friday, May 24, 2019 7:39 AM To: Joshua Kordani joshua.kordani@speedcastwireless.com Cc: BaseX basex-talk@mailman.uni-konstanz.de Subject: Re: [basex-talk] FW: Attempting to write bulk import of files is failing
Hi Joshua,
I need your input. I copied your XML files into the directory with your XQuery modules. Then created a basex command script in the same directory (test.bxs):
create db TestResults set bindings filename=MultiParty 20190508-182649.xml run import-and-process.xq list TestResults set bindings dir=./ run import-all.xq list TestResults
I called this script and I got the attached output, which looks ok to me. What did you do differently? Could you create an updated command script for me?
Best, Christian
basex -v test.bxs
Database 'TestResults' created in 34.62 ms. BINDINGS: filename=MultiParty 20190508-182649.xml
Query "import-and-process.xq" executed in 641.18 ms. Input Path Type Content-Type Size ----------------------------------------------------------- MultiParty 20190508-182649.xml xml application/xml 1291
1 Resource(s). BINDINGS: dir=./
Query "import-all.xq" executed in 115.87 ms. Input Path Type Content-Type Size ----------------------------------------------------------- MultiParty 20190508-182649.xml xml application/xml 1291 TwoParty 20190508-192109.xml xml application/xml 754
2 Resource(s).
DISCLAIMER: This email communication and any attached files are Speedcast Wireless proprietary and may be legally privileged. Export-controlled information shall not be disseminated without proper authorization and proper export-control markings, per Speedcast Wireless export policy. If you have received this transmission in error please notify the sender immediately and then delete this email and all its attachments. If you are not the addressee, any disclosure, reproduction, copying, distribution, or any other dissemination or use of this communication is strictly prohibited. Thank you.