Difference between revisions of "Exporting XML files from BPS"
Line 7: | Line 7: | ||
====The following steps describe how to do this:==== | ====The following steps describe how to do this:==== | ||
− | 1. export the data from BPS using | + | 1. export the data from BPS using ABCD2 search. After the mapping is complete within the BPS then select the "QueryForms" on the top menu as shown in the screenshot below: |
Line 13: | Line 13: | ||
− | After selecting "QueryForms" click on "ABCD2 search" from the list below the textfield, see the screenshot below. After selecting the "ABCD2 search" the field is automatically filled with the Query tags for the ABCD search. Please remove the <filter> element from the text as shown in the screenshot. | + | After selecting "QueryForms" click on "ABCD2 search" from the list below the textfield, see the screenshot below. After selecting the "ABCD2 search" the field is automatically filled with the Query tags for the ABCD search. Please remove the <filter> element from the text as shown in the screenshot. Then set the limit to 999 in the following tag: <responseFormat start='0' limit='999'> (the default limit is set to 10). |
Revision as of 15:00, 14 January 2015
Uploading large data files from BPS to reBiND
After the mapping of the data to the ABCD elements (http://wiki.bgbm.org/bps/index.php/ABCD2Mapping) the data needs to be either exported as XML files from BPS or uploaded directly to reBiND (see the following sections for details).
When the XML data files are large (> 1000 records or abcd:Units) it is currently necessary to export multiple files from the BPS and run an xquery script to join them into a single ABCD file.
The following steps describe how to do this:
1. export the data from BPS using ABCD2 search. After the mapping is complete within the BPS then select the "QueryForms" on the top menu as shown in the screenshot below:
After selecting "QueryForms" click on "ABCD2 search" from the list below the textfield, see the screenshot below. After selecting the "ABCD2 search" the field is automatically filled with the Query tags for the ABCD search. Please remove the <filter> element from the text as shown in the screenshot. Then set the limit to 999 in the following tag: <responseFormat start='0' limit='999'> (the default limit is set to 10).
2. Save each file as {dataset name}_1.xml, {dataset name}_2.xml ...
set the start=0 and the limit=998
for the next file set the start=999 and the limit=998
(continue to export XML files naming them with a sequential suffix until their are no further records)
2. Create a new project in rebind and name it with a unique name e.g. HBGnummeriert (dataset name) and then create a collection called ‘abcd’ by pressing 'Create collection'. Click on 'abcd' to navigate into the new collection. Store all of the individual ABCD files in the 'abcd' collection by pressing 'Upload File' and selecting each file - one at a time until all files are uploaded: e.g. HBGnummeriert _1.XML, HBGnummeriert_2.XML etc.
3. In another browser tab, call the following script using the following URL (replace the final part of the URL with the name of your collection e.g. if your collection is called HBGnummeriert then the URL should end with coll=HBGnummeriert)
http://http://data-rebind.bgbm.org/rebind/join_abcd.xquery?coll=HBGnummeriert