source: TI01-discovery/branches/ingestAutomation-upgrade/database/test_data.sql @ 3967

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI01-discovery/branches/ingestAutomation-upgrade/database/test_data.sql
Revision 3967, 3.1 KB checked in by cbyrom, 12 years ago (diff)

Update code to allow the extraction of authors, parameters and scope
from moles files + adjust the data model to handle these new data.

  • Property svn:executable set to *
Line 
1/*
2 * Test data to populate and exercise tables with
3 *
4 * C Byrom May 08
5 *
6 */
7INSERT INTO original_document VALUES (DEFAULT, 'tst.xml', 'test_dummy', 'DIF', null, null, null, null, to_tsvector('NERC'), current_timestamp, null, 1, 1);
8INSERT INTO original_document VALUES (DEFAULT, 'tst1.xml', 'test_record', 'DIF', '<?xml version="1.0" encoding="utf-8"?>
9<kml xmlns="http://earth.google.com/kml/2.2">
10  <Folder>
11        <name>Aggregation of KML documents by NDG Portal</name>
12    <visibility>0</visibility>
13        <open>0</open>
14        <description>The NetworkLink KML resources are those selected by the user when creating the document in the NDG portal (include URL?)</description>
15                    <NetworkLink>
16                        <name>ARGO Active float data; latitude range 45S to 90S; 18 March</name>
17                        <visibility>0</visibility>
18                        <open>0</open>
19                        <description>ARGO Active float data; latitude range 45S to 90S; 18 March - aggregated by the NDG Portal</description>
20                        <refreshVisibility>0</refreshVisibility>
21                        <flyToView>0</flyToView>
22                        <Link>
23                                <href>
24                                        http://psdocean.nerc-bas.ac.uk/ARGO/web/Active45S-90S.kmz
25                                </href>
26                        </Link>
27                </NetworkLink>
28  </Folder>
29</kml>',
30null, null, null, to_tsvector('MDIP'), current_timestamp, null, 1, 1);
31
32INSERT INTO original_document VALUES (DEFAULT, 'tst2.xml', 'test_dummy1', 'DIF', 'freds freds bloo' , null, null, null, to_tsvector('MDIP'), current_timestamp, null, 1, 1);
33INSERT INTO original_document VALUES (DEFAULT, 'tst3.xml', 'test_dummy2', null, 'fred fred bloo fred', null, null, null, to_tsvector('MDIP'), current_timestamp, null, 1, 1);
34INSERT INTO original_document VALUES (DEFAULT, 'tst4.xml', 'test_dummy3', null, 'fred fred bloo, fred, fred, fred, fre, fred', null, null, null, null, current_timestamp, null, 1, 1);
35
36UPDATE original_document SET document_ts_vector = to_tsvector('english', original_document);
37
38select original_document_id, document_ts_vector, ts_rank(document_ts_vector, query) as rank from original_document, to_tsquery('english', 'FRED') query WHERE query @@ coalesce(document_ts_vector,'') order by rank desc;
39
40
41INSERT INTO transformed_document VALUES (DEFAULT, 1,  'moles', null, current_date, null, 1);
42INSERT INTO transformed_document VALUES (DEFAULT, 1,  'mdip', 
43'<mdip xmlns="http://earth.google.com/kml/2.2">
44  <Folder>
45        <name>Aggregation of KML documents by NDG Portal</name>
46    <visibility>0</visibility>
47        <open>0</open>
48        <description>The NetworkLink KML resources are those selected by the user when creating the document in the NDG portal (include URL?)</description>
49                    <NetworkLink>
50                        <name>ARGO Active float data; latitude range 45S to 90S; 18 March</name>
51                        <visibility>0</visibility>
52                        <open>0</open>
53                        <description>ARGO Active float data; latitude range 45S to 90S; 18 March - aggregated by the NDG Portal</description>
54                        <refreshVisibility>0</refreshVisibility>
55                        <flyToView>0</flyToView>
56                        <Link>
57                                <href>
58                                        http://psdocean.nerc-bas.ac.uk/ARGO/web/Active45S-90S.kmz
59                                </href>
60                        </Link>
61                </NetworkLink>
62  </Folder>
63</mdip>',
64current_date, null, 1);
65
Note: See TracBrowser for help on using the repository browser.