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