]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/reporter/tables.example.xml
time series reporting and links for said on the wide-copy view
[Evergreen.git] / Open-ILS / src / reporter / tables.example.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <tables>
3
4         <table id="wide-copy" partition="false" fact-table="true">
5                 <label>Wide Copy info</label>
6                 <description>Base table for creating snapshot reports on copy information</description>
7                 <tablename>stats.fleshed_copy</tablename>
8
9                 <fields>
10                         <field
11                           name="id"
12                           primary="true"
13                           create-type="serial"
14                           datatype="int">
15                                 <label>ID</label>
16                                 <description>Copy ID</description>
17                         </field>
18                         <field
19                           name="barcode"
20                           widget-family="string-input"
21                           datatype="text">
22                                 <label>Barcode</label>
23                                 <description>Copy Barcode</description>
24                         </field>
25                         <field
26                           name="owning_lib"
27                           datatype="int"
28                           indexed="true">
29                                 <label>Owner</label>
30                                 <description>ID of the Owning Library</description>
31                         </field>
32                         <field
33                           name="circ_lib"
34                           datatype="int"
35                           indexed="true">
36                                 <label>Circulator</label>
37                                 <description>ID of the Circulating Library</description>
38                         </field>
39                         <field
40                           name="create_date_day"
41                           datatype="date">
42                                 <label>Create Date Joiner</label>
43                                 <description>Date of the copy's cataloging</description>
44                         </field>
45                         <field
46                           name="create_date_hour"
47                           datatype="timestamptz">
48                                 <label>Create Date and Hour Joiner</label>
49                                 <description>Date and Hour of the copy's cataloging</description>
50                         </field>
51                         <field
52                           name="create_date"
53                           datatype="timestamptz"
54                           indexed="true"
55                           default="now()">
56                                 <label>Create Date</label>
57                                 <description>Timestamp of the copy's cataloging</description>
58                         </field>
59                         <field
60                           name="edit_date_day"
61                           datatype="date">
62                                 <label>Edit Date Joiner</label>
63                                 <description>Date of the copy's last edit</description>
64                         </field>
65                         <field
66                           name="edit_date_hour"
67                           datatype="timestamptz">
68                                 <label>Edit Date and Hour Joiner</label>
69                                 <description>Date and Hour of the copy's last edit</description>
70                         </field>
71                         <field
72                           name="edit_date"
73                           datatype="timestamptz"
74                           indexed="true"
75                           default="now()">
76                                 <label>Edit Date</label>
77                                 <description>Timestamp of the copy's last edit</description>
78                         </field>
79                         <field
80                           name="item_lang"
81                           datatype="text">
82                                 <label>Language</label>
83                                 <description>MARC Item Language</description>
84                         </field>
85                         <field
86                           name="item_form"
87                           datatype="text">
88                                 <label>Form</label>
89                                 <description>MARC Item Form of Material</description>
90                         </field>
91                         <field
92                           name="item_type"
93                           datatype="text">
94                                 <label>Type</label>
95                                 <description>MARC Item Type</description>
96                         </field>
97                         <field
98                           name="call_number_label"
99                           transform-group="call_number"
100                           widget-family="string-input"
101                           datatype="text">
102                                 <label>Call Number</label>
103                                 <description>Copy Call Number Label</description>
104                         </field>
105                 </fields>
106
107                 <links>
108                         <link
109                           field="create_date_day"
110                           table="generic_day_series"
111                           id="copy_create_day"
112                           key="date"
113                           type="has_a"/>
114                         <link
115                           field="create_date_hour"
116                           table="generic_hour_series"
117                           id="copy_create_hour"
118                           key="date_hour"
119                           type="has_a"/>
120                         <link
121                           field="owning_lib"
122                           table="org_unit"
123                           id="copy_owning_lib"
124                           key="id"
125                           type="has_a"/>
126                         <link
127                           field="item_lang"
128                           table="marc_lang_map"
129                           id="copy_language"
130                           key="code"
131                           type="has_a"/>
132                         <link
133                           field="item_form"
134                           table="marc_form_map"
135                           id="copy_item_form"
136                           key="code"
137                           type="has_a"/>
138                         <link
139                           field="item_type"
140                           table="marc_type_map"
141                           id="copy_item_type"
142                           key="code"
143                           type="has_a"/>
144                         <link
145                           field="circ_lib"
146                           table="org_unit"
147                           id="copy_circ_lib"
148                           key="id"
149                           type="has_a"/>
150                 </links>
151
152         </table>
153                 
154         <table id="org_unit" partition="false" fact-table="false">
155                 <label>Organizational Units</label>
156                 <description>Table containing library hierarchy definition</description>
157                 <tablename>actor.org_unit</tablename>
158
159                 <fields>
160                         <field
161                           name="id"
162                           primary="true"
163                           create-type="serial"
164                           datatype="int">
165                                 <label>ID</label>
166                                 <description>Library ID</description>
167                         </field>
168                         <field
169                           name="name"
170                           widget-family="lib-choose"
171                           datatype="text">
172                                 <label>Name</label>
173                                 <description>Library Name</description>
174                         </field>
175                         <field
176                           name="shortname"
177                           widget-family="string-choose"
178                           datatype="text">
179                                 <label>Short Name</label>
180                                 <description>Library Short (Policy) Name</description>
181                         </field>
182                 </fields>
183         </table>
184
185         <table id="marc_lang_map" partition="false" fact-table="false">
186                 <label>MARC Language Codes</label>
187                 <description>Table mapping MARC three character codes to language names</description>
188                 <tablename>config.language_map</tablename>
189
190                 <fields>
191                         <field
192                           name="code"
193                           primary='true'
194                           datatype="text">
195                                 <label>Code</label>
196                                 <description>MARC Language Code</description>
197                         </field>
198                         <field
199                           name="value"
200                           widget-family="string-choose"
201                           datatype="text">
202                                 <label>Language Name</label>
203                                 <description>Name associated with the MARC code</description>
204                         </field>
205                 </fields>
206         </table>
207
208         <table id="generic_day_series" partition="false" fact-table="false">
209                 <label>Constant day series</label>
210                 <description>View providing a day series starting at 1900 and ending at 'now'</description>
211                 <tablename>reporter.date_series</tablename>
212
213                 <fields>
214                         <field
215                           name="date"
216                           primary='true'
217                           datatype="text">
218                                 <label>Date joiner</label>
219                                 <description>Date joiner</description>
220                         </field>
221                         <field
222                           name="date_label"
223                           datatype="date">
224                                 <label>Date</label>
225                                 <description>Date</description>
226                         </field>
227                 </fields>
228         </table>
229
230         <table id="generic_hour_series" partition="false" fact-table="false">
231                 <label>Constant hour series</label>
232                 <description>View providing a hour series starting at 1900 and ending at 'now'</description>
233                 <tablename>reporter.date_hour_series</tablename>
234
235                 <fields>
236                         <field
237                           name="date_hour"
238                           primary='true'
239                           datatype="text">
240                                 <label>time joiner</label>
241                                 <description>time joiner</description>
242                         </field>
243                         <field
244                           name="date_hour_label"
245                           datatype="timestamptz">
246                                 <label>Date and Hour</label>
247                                 <description>Date and Hour</description>
248                         </field>
249                 </fields>
250         </table>
251
252         <table id="marc_form_map" partition="false" fact-table="false">
253                 <label>MARC Item Form Codes</label>
254                 <description>Table mapping MARC three character codes to Item Form names</description>
255                 <tablename>config.item_form_map</tablename>
256
257                 <fields>
258                         <field
259                           name="code"
260                           primary='true'
261                           datatype="text">
262                                 <label>Code</label>
263                                 <description>MARC Item Form Code</description>
264                         </field>
265                         <field
266                           name="value"
267                           widget-family="string-choose"
268                           datatype="text">
269                                 <label>Item Form Name</label>
270                                 <description>Name associated with the MARC code</description>
271                         </field>
272                 </fields>
273         </table>
274
275         <table id="marc_type_map" partition="false" fact-table="false">
276                 <label>MARC Item Type Codes</label>
277                 <description>Table mapping MARC three character codes to Item Type names</description>
278                 <tablename>config.item_type_map</tablename>
279
280                 <fields>
281                         <field
282                           name="code"
283                           primary='true'
284                           datatype="text">
285                                 <label>Code</label>
286                                 <description>MARC Item Type Code</description>
287                         </field>
288                         <field
289                           name="value"
290                           widget-family="string-choose"
291                           datatype="text">
292                                 <label>Item Type Name</label>
293                                 <description>Name associated with the MARC code</description>
294                         </field>
295                 </fields>
296         </table>
297
298         <table id="silly.fact" partition="true" fact-table="false">
299                 <label>Silly Fact table</label>
300                 <description>Base table for creating reports on silly words</description>
301                 <tablename>stats.silly_fact</tablename>
302
303                 <partition>
304                         <field>said_when</field>
305                         <!-- Valid options:  years, months, weeks, days, hours, minutes, seconds  -->
306                         <chunk>months</chunk>
307                         <start>2005-09-01</start>
308                         <end>2005-12-31</end>
309                 </partition>
310
311                 <fields>
312                         <field
313                           name="id"
314                           primary="true"
315                           create-type="serial"
316                           datatype="int">
317                                 <label>Silly entry id</label>
318                                 <description>Silly entry id</description>
319                         </field>
320                         <field
321                           name="silly_word_dim"
322                           datatype="int"
323                           indexed="true">
324                                 <label>Silly word dim</label>
325                                 <description>Silly word entry dimension link</description>
326                         </field>
327                         <field
328                           name="silly_sayer_dim"
329                           datatype="int"
330                           indexed="true">
331                                 <label>Silly sayer dim</label>
332                                 <description>Silly sayer entry dimension link</description>
333                         </field>
334                         <field
335                           name="said_when"
336                           datatype="timestamptz"
337                           core="true"
338                           indexed="true"
339                           default="now()">
340                                 <label>Silly word timestamp</label>
341                                 <description>Silly word entry timestamp</description>
342                         </field>
343                 </fields>
344                 <links>
345                         <link
346                           field="silly_word_dim"
347                           table="silly.word_dim"
348                           key="id"
349                           type="has_a"/>
350                         <link
351                           field="silly_sayer_dim"
352                           table="silly.sayer_dim"
353                           key="id"
354                           type="has_a"/>
355                 </links>
356         </table>
357
358         <table id="silly.word_dim">
359                 <label>Silly word list</label>
360                 <description>Silly word list</description>
361                 <tablename>stats.words</tablename>
362                 <fields>
363                         <field
364                           name="id"
365                           primary="true"
366                           create-type="serial"
367                           datatype="int">
368                                 <label>Silly word id</label>
369                         </field>
370                         <field
371                           name="word"
372                           datatype="text"
373                           indexed="true"
374                           index-type="BTREE">
375                                 <label>Silly word</label>
376                         </field>
377                 </fields>
378         </table>
379
380         <table id="silly.sayer_dim">
381                 <label>Silly word sayer list</label>
382                 <description>Silly word sayer list</description>
383                 <tablename>stats.silly_sayers</tablename>
384                 <fields>
385                         <field
386                           name="id"
387                           primary="true"
388                           create-type="serial"
389                           datatype="int">
390                                 <label>Silly person id</label>
391                         </field>
392                         <field
393                           name="sayer"
394                           widget-family="string-choose"
395                           datatype="text"
396                           indexed="true"
397                           index-type="BTREE">
398                                 <label>Silly person</label>
399                         </field>
400                 </fields>
401         </table>
402
403 </tables>
404