making PKEY optional, not creating indexes on base table of partition set (no need)
[Evergreen.git] / Open-ILS / src / reporter / report_base.example.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <reporter xmlns:xi="http://www.w3.org/2001/XInclude">
3         <classes>
4
5                 <class
6                   name="silly-all"
7                   fact-table="silly.fact">
8                         <description>Silly Report base</description>
9                         <dims>
10                                 <dim include="silly_word_dim"/>
11                                 <dim include="silly_sayer_dim"/>
12                         </dims>
13                 </class>
14
15                 <class
16                   name="silly-words"
17                   fact-table="silly.fact">
18                         <description>Silly Word Report base</description>
19                         <dims>
20                                 <dim include="silly_word_dim"/>
21                         </dims>
22                 </class>
23         </classes>
24
25         <tables>
26
27                 <table id="silly.fact" partition="true">
28                         <tablename>stats.silly_fact</tablename>
29
30                         <partition>
31                                 <field>said_when</field>
32                                 <!-- Valid options:  month, year, woy (week of year), doy (day of year) -->
33                                 <chunk>month</chunk>
34                                 <start>2005-09-01</start>
35                                 <end>2005-12-31</end>
36                         </partition>
37
38                         <fields>
39                                 <field
40                                   name="silly_word_dim"
41                                   datatype="int"
42                                   indexed="true">
43                                         <label>Silly word dim</label>
44                                         <description>Silly word entry dimension link</description>
45                                 </field>
46                                 <field
47                                   name="silly_sayer_dim"
48                                   datatype="int"
49                                   indexed="true">
50                                         <label>Silly sayer dim</label>
51                                         <description>Silly sayer entry dimension link</description>
52                                 </field>
53                                 <field
54                                   name="said_when"
55                                   datatype="timestamptz"
56                                   core="true"
57                                   indexed="true"
58                                   default="now()">
59                                         <label>Silly word timestamp</label>
60                                         <description>Silly word entry timestamp</description>
61                                 </field>
62                         </fields>
63                         <links>
64                                 <link
65                                   field="silly_word_dim"
66                                   table="silly.word_dim"
67                                   key="id"
68                                   type="has_a"/>
69                                 <link
70                                   field="silly_sayer_dim"
71                                   table="silly.sayer_dim"
72                                   key="id"
73                                   type="has_a"/>
74                         </links>
75                 </table>
76
77                 <table id="silly.word_dim">
78                         <tablename>stats.words</tablename>
79                         <fields>
80                                 <field
81                                   name="id"
82                                   primary="1"
83                                   create-type="serial"
84                                   datatype="int"/>
85                                 <field
86                                   name="word"
87                                   datatype="text"
88                                   indexed="true"
89                                   index-type="BTREE"/>
90                         </fields>
91                 </table>
92
93                 <table id="silly.sayer_dim">
94                         <tablename>stats.silly_sayers</tablename>
95                         <fields>
96                                 <field
97                                   name="id"
98                                   primary="1"
99                                   create-type="serial"
100                                   datatype="int"/>
101                                 <field
102                                   name="sayer"
103                                   datatype="text"
104                                   indexed="true"
105                                   index-type="BTREE"/>
106                         </fields>
107                 </table>
108
109         </tables>
110 </reporter>