business.xsd 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- edited with XMLSpy v2016 sp1 (x64) (http://www.altova.com) by IBM SWG CANADA (IBM SWG Canada) -->
  3. <!--
  4. Licensed Materials - Property of IBM
  5. IBM Cognos Products: moser
  6. (C) Copyright IBM Corp. 2015, 2016
  7. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  8. -->
  9. <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="2.0">
  10. <xsd:include schemaLocation="metadata.xsd"/>
  11. <xsd:element name="querySubject">
  12. <xsd:annotation>
  13. <xsd:documentation>Represents a query.</xsd:documentation>
  14. </xsd:annotation>
  15. <xsd:complexType>
  16. <xsd:complexContent>
  17. <xsd:extension base="objectType">
  18. <xsd:sequence>
  19. <xsd:element name="ref" type="xsd:string" minOccurs="0" maxOccurs="unbounded">
  20. <xsd:annotation>
  21. <xsd:documentation>Defines references to query subject or table that can be in the same or different module. used to resolve one part name in query item.</xsd:documentation>
  22. </xsd:annotation>
  23. </xsd:element>
  24. <xsd:element name="instanceType" type="instanceType" minOccurs="0" maxOccurs="1">
  25. <xsd:annotation>
  26. <xsd:documentation>Defines whether the object is a copy or a reference.</xsd:documentation>
  27. </xsd:annotation>
  28. </xsd:element>
  29. <xsd:element name="generateSQL" default="asView">
  30. <xsd:annotation>
  31. <xsd:documentation>Causes a query to generate the SQL commands used. If set to minimized, only the required query items appear in the generated SQL. If set to asView, all query items appear.</xsd:documentation>
  32. </xsd:annotation>
  33. <xsd:simpleType>
  34. <xsd:restriction base="xsd:NMTOKEN">
  35. <xsd:enumeration value="asView">
  36. <xsd:annotation>
  37. <xsd:documentation>Specifies that all query items appear in the generated SQL.</xsd:documentation>
  38. </xsd:annotation>
  39. </xsd:enumeration>
  40. <xsd:enumeration value="minimized">
  41. <xsd:annotation>
  42. <xsd:documentation>Specifies that only the required query items appear in the generated SQL.</xsd:documentation>
  43. </xsd:annotation>
  44. </xsd:enumeration>
  45. </xsd:restriction>
  46. </xsd:simpleType>
  47. </xsd:element>
  48. <xsd:element name="useInJoinPath" type="xsd:boolean" default="false" minOccurs="0">
  49. <xsd:annotation>
  50. <xsd:documentation>
  51. <para>Related with the contextSensitiveJoinSelection governor, when the setting is explicit</para>
  52. <para>If set to true, the querySubject will be used in the joinPath</para>
  53. </xsd:documentation>
  54. </xsd:annotation>
  55. </xsd:element>
  56. <xsd:element name="numberOfRows" type="xsd:string" minOccurs="0" maxOccurs="1">
  57. <xsd:annotation>
  58. <xsd:documentation>
  59. <para>number of rows of the query subject in text format, e.g. 1K, 2M.</para>
  60. </xsd:documentation>
  61. </xsd:annotation>
  62. </xsd:element>
  63. <xsd:element name="querySubjectUsage" default="automatic" minOccurs="0" maxOccurs="1">
  64. <xsd:annotation>
  65. <xsd:documentation>Defines the intended usage of the query subject. </xsd:documentation>
  66. </xsd:annotation>
  67. <xsd:simpleType>
  68. <xsd:restriction base="xsd:NMTOKEN">
  69. <xsd:enumeration value="automatic">
  70. <xsd:annotation>
  71. <xsd:documentation>Specifies that the querySubject usage is automatic and therefore it will be computed by the planning code.</xsd:documentation>
  72. </xsd:annotation>
  73. </xsd:enumeration>
  74. <xsd:enumeration value="bridge">
  75. <xsd:annotation>
  76. <xsd:documentation>Specifies that the querySubject refers to a bridge table.</xsd:documentation>
  77. </xsd:annotation>
  78. </xsd:enumeration>
  79. <xsd:enumeration value="summaryQuery">
  80. <xsd:annotation>
  81. <xsd:documentation>Specifies that the querySubject will be treated as a summaryQuery.</xsd:documentation>
  82. </xsd:annotation>
  83. </xsd:enumeration>
  84. </xsd:restriction>
  85. </xsd:simpleType>
  86. </xsd:element>
  87. <xsd:element name="useLocalCache" type="xsd:boolean" default="false" minOccurs="0" maxOccurs="1">
  88. <xsd:annotation>
  89. <xsd:documentation>
  90. <para>Property that is processed in relational query planning when the query subject usage is specified as summaryQuery.</para>
  91. </xsd:documentation>
  92. </xsd:annotation>
  93. </xsd:element>
  94. <xsd:element name="columnDependency" minOccurs="0" maxOccurs="unbounded">
  95. <xsd:complexType>
  96. <xsd:sequence>
  97. <xsd:element name="ref" type="xsd:string" minOccurs="1" maxOccurs="1"/>
  98. <xsd:element name="keyRef" type="xsd:string" minOccurs="1" maxOccurs="unbounded"/>
  99. </xsd:sequence>
  100. </xsd:complexType>
  101. </xsd:element>
  102. <xsd:element ref="queryItem" minOccurs="0" maxOccurs="unbounded"/>
  103. <xsd:element ref="filter" minOccurs="0" maxOccurs="unbounded"/>
  104. <xsd:choice>
  105. <xsd:element name="dbQuery" minOccurs="0" maxOccurs="1">
  106. <xsd:annotation>
  107. <xsd:documentation>Defines a query against the specified database.</xsd:documentation>
  108. </xsd:annotation>
  109. <xsd:complexType>
  110. <xsd:sequence>
  111. <xsd:element name="ref" type="xsd:string" minOccurs="1" maxOccurs="unbounded">
  112. <xsd:annotation>
  113. <xsd:documentation>reference to database.</xsd:documentation>
  114. </xsd:annotation>
  115. </xsd:element>
  116. <xsd:element ref="sql" minOccurs="0" maxOccurs="1"/>
  117. </xsd:sequence>
  118. </xsd:complexType>
  119. </xsd:element>
  120. <xsd:element name="queryOperation" minOccurs="0" maxOccurs="1">
  121. <xsd:annotation>
  122. <xsd:documentation>A query that represents the union, intersection or except of query subjects or tables. union can have more than two query subjects or tables.</xsd:documentation>
  123. </xsd:annotation>
  124. <xsd:complexType>
  125. <xsd:sequence>
  126. <xsd:element name="ref" type="xsd:string" minOccurs="2" maxOccurs="unbounded">
  127. <xsd:annotation>
  128. <xsd:documentation>reference to other query subjects or tables.</xsd:documentation>
  129. </xsd:annotation>
  130. </xsd:element>
  131. <xsd:element name="setOperation" default="UNION">
  132. <xsd:simpleType>
  133. <xsd:restriction base="xsd:NMTOKEN">
  134. <xsd:enumeration value="UNION"/>
  135. <xsd:enumeration value="INTERSECT"/>
  136. <xsd:enumeration value="EXCEPT"/>
  137. </xsd:restriction>
  138. </xsd:simpleType>
  139. </xsd:element>
  140. <xsd:element name="duplicates" default="remove">
  141. <xsd:simpleType>
  142. <xsd:restriction base="xsd:NMTOKEN">
  143. <xsd:enumeration value="remove"/>
  144. <xsd:enumeration value="preserve"/>
  145. </xsd:restriction>
  146. </xsd:simpleType>
  147. </xsd:element>
  148. </xsd:sequence>
  149. </xsd:complexType>
  150. </xsd:element>
  151. <xsd:element ref="relationship" minOccurs="0" maxOccurs="1">
  152. <xsd:annotation>
  153. <xsd:documentation>A query that represents the join of two query subjects or tables.</xsd:documentation>
  154. </xsd:annotation>
  155. </xsd:element>
  156. </xsd:choice>
  157. </xsd:sequence>
  158. </xsd:extension>
  159. </xsd:complexContent>
  160. </xsd:complexType>
  161. </xsd:element>
  162. <xsd:element name="sql">
  163. <xsd:annotation>
  164. <xsd:documentation>SQL definition.</xsd:documentation>
  165. </xsd:annotation>
  166. <xsd:complexType mixed="true">
  167. <xsd:sequence>
  168. <xsd:element name="type" default="cognos" minOccurs="0" maxOccurs="1">
  169. <xsd:annotation>
  170. <xsd:documentation>Specifies the level of flexibility the system is allowed in optimizing the SQL from this element, before presenting it to the data source.</xsd:documentation>
  171. </xsd:annotation>
  172. <xsd:simpleType>
  173. <xsd:restriction base="xsd:NMTOKEN">
  174. <xsd:enumeration value="cognos">
  175. <xsd:annotation>
  176. <xsd:documentation>Cognos SQL can be optimized by the system and combined with other SQL before being sent to the data source.</xsd:documentation>
  177. </xsd:annotation>
  178. </xsd:enumeration>
  179. <xsd:enumeration value="native">
  180. <xsd:annotation>
  181. <xsd:documentation>Native SQL cannot be modified except by macro substitution, but can be combined with other SQL into a single SQL query to send to the data source.</xsd:documentation>
  182. </xsd:annotation>
  183. </xsd:enumeration>
  184. <xsd:enumeration value="passThrough">
  185. <xsd:annotation>
  186. <xsd:documentation>Pass-through SQL cannot be modified except by macro substitution, and cannot be combined with other SQL. It must be sent to the data source as a stand-alone query. However, results can be combined with results of other queries.</xsd:documentation>
  187. </xsd:annotation>
  188. </xsd:enumeration>
  189. </xsd:restriction>
  190. </xsd:simpleType>
  191. </xsd:element>
  192. <xsd:element name="sqlText" type="xsd:string" minOccurs="0" maxOccurs="1"/>
  193. </xsd:sequence>
  194. </xsd:complexType>
  195. </xsd:element>
  196. <xsd:complexType name="facetType">
  197. <xsd:sequence>
  198. <xsd:element name="enabled" default="automatic">
  199. <xsd:simpleType>
  200. <xsd:restriction base="xsd:NMTOKEN">
  201. <xsd:enumeration value="automatic">
  202. <xsd:annotation>
  203. <xsd:documentation>automatic is resolved to true or false. Rule: true if the usage of the query item/calculation is attribute, and the data type supports precise value comparison (e.g. false for float/double because they are approximate number)
  204. </xsd:documentation>
  205. </xsd:annotation>
  206. </xsd:enumeration>
  207. <xsd:enumeration value="true"/>
  208. <xsd:enumeration value="false"/>
  209. </xsd:restriction>
  210. </xsd:simpleType>
  211. </xsd:element>
  212. <xsd:element name="sortList" minOccurs="0">
  213. <xsd:annotation>
  214. <xsd:documentation>if sortList is absent, sort on the query item/calculation ASC NULLS LAST.</xsd:documentation>
  215. </xsd:annotation>
  216. <xsd:complexType>
  217. <xsd:sequence>
  218. <xsd:element name="sortItem" maxOccurs="unbounded">
  219. <xsd:complexType>
  220. <xsd:sequence>
  221. <xsd:element name="ref" type="xsd:string">
  222. <xsd:annotation>
  223. <xsd:documentation>reference to query item/calculation.</xsd:documentation>
  224. </xsd:annotation>
  225. </xsd:element>
  226. <xsd:element name="order" default="ascending">
  227. <xsd:simpleType>
  228. <xsd:restriction base="xsd:NMTOKEN">
  229. <xsd:enumeration value="ascending"/>
  230. <xsd:enumeration value="descending"/>
  231. </xsd:restriction>
  232. </xsd:simpleType>
  233. </xsd:element>
  234. <xsd:element name="nullPlacement" default="last">
  235. <xsd:simpleType>
  236. <xsd:restriction base="xsd:NMTOKEN">
  237. <xsd:enumeration value="first"/>
  238. <xsd:enumeration value="last"/>
  239. </xsd:restriction>
  240. </xsd:simpleType>
  241. </xsd:element>
  242. </xsd:sequence>
  243. </xsd:complexType>
  244. </xsd:element>
  245. </xsd:sequence>
  246. </xsd:complexType>
  247. </xsd:element>
  248. <xsd:element name="context" minOccurs="0" maxOccurs="1">
  249. <xsd:annotation>
  250. <xsd:documentation>the facet value combined with context will be unique if context is unique.
  251. e.g. Week has Year as context. Year + Week is unique. WeekDay has Week as context. Year + Week + WeekDay is unique.
  252. If context is absent, the facet is unique.</xsd:documentation>
  253. </xsd:annotation>
  254. <xsd:complexType>
  255. <xsd:sequence>
  256. <xsd:element name="ref" type="xsd:string" minOccurs="1" maxOccurs="1">
  257. <xsd:annotation>
  258. <xsd:documentation>reference to context query item/calculation.</xsd:documentation>
  259. </xsd:annotation>
  260. </xsd:element>
  261. <xsd:element name="mode" minOccurs="0" maxOccurs="1">
  262. <xsd:annotation>
  263. <xsd:documentation>define the behavior if context is missing in the query.</xsd:documentation>
  264. </xsd:annotation>
  265. <xsd:simpleType>
  266. <xsd:restriction base="xsd:NMTOKEN">
  267. <xsd:enumeration value="warnWhenMissing">
  268. <xsd:annotation>
  269. <xsd:documentation>issue a warning.</xsd:documentation>
  270. </xsd:annotation>
  271. </xsd:enumeration>
  272. <xsd:enumeration value="includeInQuery">
  273. <xsd:annotation>
  274. <xsd:documentation>context is required in query (project or in filter).</xsd:documentation>
  275. </xsd:annotation>
  276. </xsd:enumeration>
  277. <xsd:enumeration value="infoWhenMissing">
  278. <xsd:annotation>
  279. <xsd:documentation>provide detail information if context is missing in the query.</xsd:documentation>
  280. </xsd:annotation>
  281. </xsd:enumeration>
  282. </xsd:restriction>
  283. </xsd:simpleType>
  284. </xsd:element>
  285. </xsd:sequence>
  286. </xsd:complexType>
  287. </xsd:element>
  288. </xsd:sequence>
  289. </xsd:complexType>
  290. <xsd:element name="queryItem">
  291. <xsd:annotation>
  292. <xsd:documentation>A query item from a query subject</xsd:documentation>
  293. </xsd:annotation>
  294. <xsd:complexType>
  295. <xsd:complexContent>
  296. <xsd:extension base="objectType">
  297. <xsd:sequence>
  298. <xsd:element name="expression" type="xsd:string" minOccurs="0" maxOccurs="1"/>
  299. <xsd:element name="usage" default="automatic" minOccurs="0" maxOccurs="1">
  300. <xsd:annotation>
  301. <xsd:documentation>Defines the intended usage of the query item. </xsd:documentation>
  302. </xsd:annotation>
  303. <xsd:simpleType>
  304. <xsd:restriction base="xsd:NMTOKEN">
  305. <xsd:enumeration value="automatic">
  306. <xsd:annotation>
  307. <xsd:documentation>Specifies that the usage is not known.</xsd:documentation>
  308. </xsd:annotation>
  309. </xsd:enumeration>
  310. <xsd:enumeration value="identifier">
  311. <xsd:annotation>
  312. <xsd:documentation>Specifies that the object is to be treated as an identifier.</xsd:documentation>
  313. </xsd:annotation>
  314. </xsd:enumeration>
  315. <xsd:enumeration value="fact">
  316. <xsd:annotation>
  317. <xsd:documentation>Specifies that the object is to be treated as a fact.</xsd:documentation>
  318. </xsd:annotation>
  319. </xsd:enumeration>
  320. <xsd:enumeration value="attribute">
  321. <xsd:annotation>
  322. <xsd:documentation>Specifies that the object is to be treated as an attribute.</xsd:documentation>
  323. </xsd:annotation>
  324. </xsd:enumeration>
  325. </xsd:restriction>
  326. </xsd:simpleType>
  327. </xsd:element>
  328. <xsd:element name="format" type="xsd:string" minOccurs="0" maxOccurs="1">
  329. <xsd:annotation>
  330. <xsd:documentation>Specifies the format for the parent object.</xsd:documentation>
  331. </xsd:annotation>
  332. </xsd:element>
  333. <xsd:element name="datatype" type="xsd:string" minOccurs="0" maxOccurs="1"/>
  334. <xsd:element name="nullable" type="xsd:boolean" default="false" minOccurs="0" maxOccurs="1"/>
  335. <xsd:element name="regularAggregate" type="regularAggregateType" default="automatic" minOccurs="0" maxOccurs="1">
  336. <xsd:annotation>
  337. <xsd:documentation>
  338. <para>Specifies the aggregation rule.</para>
  339. </xsd:documentation>
  340. </xsd:annotation>
  341. </xsd:element>
  342. <xsd:element name="datatypeCategory" minOccurs="0" maxOccurs="1">
  343. <xsd:annotation>
  344. <xsd:documentation>High level datatype. </xsd:documentation>
  345. </xsd:annotation>
  346. <xsd:simpleType>
  347. <xsd:restriction base="xsd:NMTOKEN">
  348. <xsd:enumeration value="boolean"/>
  349. <xsd:enumeration value="string"/>
  350. <xsd:enumeration value="number"/>
  351. <xsd:enumeration value="datetime"/>
  352. <xsd:enumeration value="interval"/>
  353. <xsd:enumeration value="array"/>
  354. <xsd:enumeration value="object"/>
  355. <xsd:enumeration value="period"/>
  356. </xsd:restriction>
  357. </xsd:simpleType>
  358. </xsd:element>
  359. <xsd:element name="facetDefinition" type="facetType" minOccurs="0" maxOccurs="1">
  360. <xsd:annotation>
  361. <xsd:documentation>If facetDefinition is absent, treat it as automatic (see enabled in facetType).</xsd:documentation>
  362. </xsd:annotation>
  363. </xsd:element>
  364. <xsd:element name="concepts" type="xsd:string" minOccurs="0" maxOccurs="unbounded">
  365. <xsd:annotation>
  366. <xsd:documentation>Concepts from SMD.</xsd:documentation>
  367. </xsd:annotation>
  368. </xsd:element>
  369. <xsd:element name="taxonomy" type="taxonomyType" minOccurs="0" maxOccurs="unbounded">
  370. <xsd:annotation>
  371. <xsd:documentation>
  372. <para>Specifies the query item data classification and whether it represents a geographic or time related concept.</para>
  373. </xsd:documentation>
  374. </xsd:annotation>
  375. </xsd:element>
  376. <xsd:element name="minimumValue" type="xsd:string" minOccurs="0" maxOccurs="1">
  377. <xsd:annotation>
  378. <xsd:documentation>minimum value retrieved during SMD. The text format is: sign + decimal + abbreviation for thousand, million, billion.
  379. Example: -100, -1.3K, -2.1M, -0.4G</xsd:documentation>
  380. </xsd:annotation>
  381. </xsd:element>
  382. <xsd:element name="maximumValue" type="xsd:string" minOccurs="0" maxOccurs="1">
  383. <xsd:annotation>
  384. <xsd:documentation>maximum value retrieved during SMD. The text format is: sign + decimal + abbreviation for thousand, million, billion.
  385. Example: 50, 3K, 5M</xsd:documentation>
  386. </xsd:annotation>
  387. </xsd:element>
  388. <xsd:element name="numberOfDistinctValues" type="xsd:string" minOccurs="0" maxOccurs="1">
  389. <xsd:annotation>
  390. <xsd:documentation>number of distinct values retrieved during SMD. The text format is: decimal + abbreviation for thousand, million, billion.
  391. Example: 5, 4.5K, 1G</xsd:documentation>
  392. </xsd:annotation>
  393. </xsd:element>
  394. <xsd:element name="splitDefinition"
  395. type="splitType" minOccurs="0" maxOccurs="1">
  396. </xsd:element>
  397. </xsd:sequence>
  398. </xsd:extension>
  399. </xsd:complexContent>
  400. </xsd:complexType>
  401. </xsd:element>
  402. <xsd:simpleType name="regularAggregateType">
  403. <xsd:annotation>
  404. <xsd:documentation>The aggregation rule. same as V5 aggregate name. </xsd:documentation>
  405. </xsd:annotation>
  406. <xsd:restriction base="xsd:NMTOKEN">
  407. <xsd:enumeration value="none">
  408. <xsd:annotation>
  409. <xsd:documentation>Aggregation is not supported for this object.</xsd:documentation>
  410. </xsd:annotation>
  411. </xsd:enumeration>
  412. <xsd:enumeration value="average">
  413. <xsd:annotation>
  414. <xsd:documentation>Aggregation is computed as an average of the values in the result set for this object.</xsd:documentation>
  415. </xsd:annotation>
  416. </xsd:enumeration>
  417. <xsd:enumeration value="automatic">
  418. <xsd:annotation>
  419. <xsd:documentation>The aggregation rule is determined automatically at run time.</xsd:documentation>
  420. </xsd:annotation>
  421. </xsd:enumeration>
  422. <xsd:enumeration value="calculated">
  423. <xsd:annotation>
  424. <xsd:documentation>Aggregated values are computed by aggregating the elements of the expression rather than the result. For example, if the aggregate rule for Q1_a is set to total, and the rule for q1_b is set to average, then if this query item is based on the expression (QI_a / QI_b) * 100, the aggregate is computed as: ( total(QI_a) / average( QI_b ) ) * 100.
  425. </xsd:documentation>
  426. </xsd:annotation>
  427. </xsd:enumeration>
  428. <xsd:enumeration value="count">
  429. <xsd:annotation>
  430. <xsd:documentation>Aggregation is computed as a count of the items in the result set for this object.</xsd:documentation>
  431. </xsd:annotation>
  432. </xsd:enumeration>
  433. <xsd:enumeration value="countDistinct">
  434. <xsd:annotation>
  435. <xsd:documentation>Aggregation is computed as a count of unique items in the result set for this object.</xsd:documentation>
  436. </xsd:annotation>
  437. </xsd:enumeration>
  438. <xsd:enumeration value="countNonZero">
  439. <xsd:annotation>
  440. <xsd:documentation>Excludes zero and NULL values.</xsd:documentation>
  441. </xsd:annotation>
  442. </xsd:enumeration>
  443. <xsd:enumeration value="maximum">
  444. <xsd:annotation>
  445. <xsd:documentation>Aggregation determines the maximum value in the result set for this object.</xsd:documentation>
  446. </xsd:annotation>
  447. </xsd:enumeration>
  448. <xsd:enumeration value="median">
  449. <xsd:annotation>
  450. <xsd:documentation>Aggregation determines the median value in the result set for this object.</xsd:documentation>
  451. </xsd:annotation>
  452. </xsd:enumeration>
  453. <xsd:enumeration value="minimum">
  454. <xsd:annotation>
  455. <xsd:documentation>Aggregation determines the minimum value in the result set for this object.</xsd:documentation>
  456. </xsd:annotation>
  457. </xsd:enumeration>
  458. <xsd:enumeration value="standardDeviation">
  459. <xsd:annotation>
  460. <xsd:documentation>Aggregation determines the standard deviation in the result set for this object.</xsd:documentation>
  461. </xsd:annotation>
  462. </xsd:enumeration>
  463. <xsd:enumeration value="total">
  464. <xsd:annotation>
  465. <xsd:documentation>Aggregation determines the total of the values in the result set for this object.</xsd:documentation>
  466. </xsd:annotation>
  467. </xsd:enumeration>
  468. <xsd:enumeration value="variance">
  469. <xsd:annotation>
  470. <xsd:documentation>Aggregation determines the variance in the result set for this object.</xsd:documentation>
  471. </xsd:annotation>
  472. </xsd:enumeration>
  473. </xsd:restriction>
  474. </xsd:simpleType>
  475. <xsd:simpleType name="cardinalityEnum">
  476. <xsd:restriction base="xsd:NMTOKEN">
  477. <xsd:enumeration value="zero">
  478. <xsd:annotation>
  479. <xsd:documentation>Specifies that this object has no rows.</xsd:documentation>
  480. </xsd:annotation>
  481. </xsd:enumeration>
  482. <xsd:enumeration value="one">
  483. <xsd:annotation>
  484. <xsd:documentation>Specifies that this object has one row only.</xsd:documentation>
  485. </xsd:annotation>
  486. </xsd:enumeration>
  487. <xsd:enumeration value="many">
  488. <xsd:annotation>
  489. <xsd:documentation>Specifies that this object can have many rows.</xsd:documentation>
  490. </xsd:annotation>
  491. </xsd:enumeration>
  492. </xsd:restriction>
  493. </xsd:simpleType>
  494. <xsd:complexType name="cardinalityType">
  495. <xsd:sequence>
  496. <xsd:element name="ref" type="xsd:string" minOccurs="0" maxOccurs="1">
  497. <xsd:annotation>
  498. <xsd:documentation>References a query subject or table.</xsd:documentation>
  499. </xsd:annotation>
  500. </xsd:element>
  501. <xsd:element name="mincard" type="cardinalityEnum" minOccurs="0" maxOccurs="1">
  502. <xsd:annotation>
  503. <xsd:documentation>
  504. <para>The minimum number (cardinality) of rows that will match this end of the relationship. Normally zero or one.</para>
  505. </xsd:documentation>
  506. </xsd:annotation>
  507. </xsd:element>
  508. <xsd:element name="maxcard" type="cardinalityEnum" minOccurs="0" maxOccurs="1">
  509. <xsd:annotation>
  510. <xsd:documentation>
  511. <para>The maximum number (cardinality) of rows that will match this end of the relationship. The value is normally one or many.</para>
  512. </xsd:documentation>
  513. </xsd:annotation>
  514. </xsd:element>
  515. </xsd:sequence>
  516. </xsd:complexType>
  517. <xsd:element name="relationship">
  518. <xsd:annotation>
  519. <xsd:documentation>
  520. join two query subjects / tables.
  521. </xsd:documentation>
  522. </xsd:annotation>
  523. <xsd:complexType>
  524. <xsd:complexContent>
  525. <xsd:extension base="objectType">
  526. <xsd:sequence>
  527. <xsd:element name="ref" type="xsd:string" minOccurs="0" maxOccurs="1">
  528. <xsd:annotation>
  529. <xsd:documentation>Defines a reference to a relationship in a referenced module.</xsd:documentation>
  530. </xsd:annotation>
  531. </xsd:element>
  532. <xsd:element name="instanceType" type="instanceType" minOccurs="0" maxOccurs="1">
  533. <xsd:annotation>
  534. <xsd:documentation>Defines whether the object is a copy or a reference.</xsd:documentation>
  535. </xsd:annotation>
  536. </xsd:element>
  537. <xsd:element name="left" type="cardinalityType" minOccurs="1" maxOccurs="1">
  538. <xsd:annotation>
  539. <xsd:documentation>References the left query subject or table in a relationship.</xsd:documentation>
  540. </xsd:annotation>
  541. </xsd:element>
  542. <xsd:element name="right" type="cardinalityType" minOccurs="1" maxOccurs="1">
  543. <xsd:annotation>
  544. <xsd:documentation>References the right query subject or table in a relationship.</xsd:documentation>
  545. </xsd:annotation>
  546. </xsd:element>
  547. <xsd:choice>
  548. <xsd:element name="expression" type="xsd:string" minOccurs="0" maxOccurs="1"/>
  549. <xsd:element name="link" minOccurs="0" maxOccurs="unbounded">
  550. <xsd:complexType>
  551. <xsd:sequence>
  552. <xsd:element name="leftRef" type="xsd:string" minOccurs="1" maxOccurs="1"/>
  553. <xsd:element name="rightRef" type="xsd:string" minOccurs="1" maxOccurs="1"/>
  554. </xsd:sequence>
  555. </xsd:complexType>
  556. </xsd:element>
  557. </xsd:choice>
  558. <xsd:element name="joinFilterType" default="none" minOccurs="0" maxOccurs="1">
  559. <xsd:annotation>
  560. <xsd:documentation>Presence of this element triggers filter join optimization in which is generated in order to optimize local join processing. The filter will be applied to the many side of the relationship. If there is no many side or if both are many, then the filter will be applied to the right side.</xsd:documentation>
  561. </xsd:annotation>
  562. <xsd:simpleType>
  563. <xsd:restriction base="xsd:NMTOKEN">
  564. <xsd:enumeration value="none">
  565. <xsd:annotation>
  566. <xsd:documentation>No predicate is generated.</xsd:documentation>
  567. </xsd:annotation>
  568. </xsd:enumeration>
  569. <xsd:enumeration value="in">
  570. <xsd:annotation>
  571. <xsd:documentation>Generates an IN predicate of constant values.</xsd:documentation>
  572. </xsd:annotation>
  573. </xsd:enumeration>
  574. <xsd:enumeration value="between">
  575. <xsd:annotation>
  576. <xsd:documentation>Generates a BETWEEN predicate comprised of MIN and MAX values of the join keys.</xsd:documentation>
  577. </xsd:annotation>
  578. </xsd:enumeration>
  579. <xsd:enumeration value="table">
  580. <xsd:annotation>
  581. <xsd:documentation>Generates a table row constructor form of the IN predicate.</xsd:documentation>
  582. </xsd:annotation>
  583. </xsd:enumeration>
  584. </xsd:restriction>
  585. </xsd:simpleType>
  586. </xsd:element>
  587. </xsd:sequence>
  588. </xsd:extension>
  589. </xsd:complexContent>
  590. </xsd:complexType>
  591. </xsd:element>
  592. <xsd:element name="parameterMap">
  593. <xsd:annotation>
  594. <xsd:documentation>A lookup table for controlling query generation. As a minimum, the _env and _governor maps are required.</xsd:documentation>
  595. </xsd:annotation>
  596. <xsd:complexType>
  597. <xsd:complexContent>
  598. <xsd:extension base="objectType">
  599. <xsd:sequence>
  600. <xsd:element name="defaultValue" type="xsd:string" minOccurs="0" maxOccurs="1">
  601. <xsd:annotation>
  602. <xsd:documentation>Specifies the value to use if no key match is found. If not set, external sources for parameterMaps of this name may be searched.</xsd:documentation>
  603. </xsd:annotation>
  604. </xsd:element>
  605. <xsd:element name="freshness" type="xsd:string" default="-1" minOccurs="0" maxOccurs="1">
  606. <xsd:annotation>
  607. <xsd:documentation>During macro evaluation, the parameter map will be reloaded if it was loaded more than the specified number of seconds ago. The default is -1, which means that the data will be loaded only once.</xsd:documentation>
  608. </xsd:annotation>
  609. </xsd:element>
  610. <xsd:element name="loadAsNeeded" type="xsd:boolean" default="false" minOccurs="0" maxOccurs="1">
  611. <xsd:annotation>
  612. <xsd:documentation>When set to true, then the map will be loaded one key-value at a time, when a key-ed accesses is made. When a getAllEntries access is made, then this flag is ignored.</xsd:documentation>
  613. </xsd:annotation>
  614. </xsd:element>
  615. <xsd:choice minOccurs="0">
  616. <xsd:element name="parameterMapEntry" minOccurs="0" maxOccurs="unbounded">
  617. <xsd:annotation>
  618. <xsd:documentation>Specifies that the object is an entry in a parameter map.</xsd:documentation>
  619. </xsd:annotation>
  620. <xsd:complexType>
  621. <xsd:sequence>
  622. <xsd:element name="key" type="xsd:string" minOccurs="1" maxOccurs="1">
  623. <xsd:annotation>
  624. <xsd:documentation>Defines the unique identifier for the object.</xsd:documentation>
  625. </xsd:annotation>
  626. </xsd:element>
  627. <xsd:element name="value" type="xsd:string" minOccurs="1" maxOccurs="1">
  628. <xsd:annotation>
  629. <xsd:documentation>The value that gets returned when the parameter map locates the key value.</xsd:documentation>
  630. </xsd:annotation>
  631. </xsd:element>
  632. </xsd:sequence>
  633. </xsd:complexType>
  634. </xsd:element>
  635. <xsd:element name="queryItemMap" minOccurs="0" maxOccurs="1">
  636. <xsd:annotation>
  637. <xsd:documentation>Specifies that the set of entries in the parameterMap is based on two queryItem references: one represents the set of keys, and the second represents the set of values.</xsd:documentation>
  638. </xsd:annotation>
  639. <xsd:complexType>
  640. <xsd:sequence>
  641. <xsd:annotation>
  642. <xsd:documentation>The queryItems being referenced must belong to the same querySubject.</xsd:documentation>
  643. </xsd:annotation>
  644. <xsd:element name="keyRef" type="xsd:string" minOccurs="1" maxOccurs="1">
  645. <xsd:annotation>
  646. <xsd:documentation>When a parameterMap has been defined, the query looks for this unique identifier when it executes and returns the value in the valueRef element.</xsd:documentation>
  647. </xsd:annotation>
  648. </xsd:element>
  649. <xsd:element name="valueRef" type="xsd:string" minOccurs="1" maxOccurs="1">
  650. <xsd:annotation>
  651. <xsd:documentation>When a parameterMap has been defined, and the unique identifier (keyRef) has been found by the query, this value gets returned when the query executes.</xsd:documentation>
  652. </xsd:annotation>
  653. </xsd:element>
  654. </xsd:sequence>
  655. </xsd:complexType>
  656. </xsd:element>
  657. </xsd:choice>
  658. </xsd:sequence>
  659. </xsd:extension>
  660. </xsd:complexContent>
  661. </xsd:complexType>
  662. </xsd:element>
  663. <xsd:element name="calculation">
  664. <xsd:annotation>
  665. <xsd:documentation>Defines an expression aggregate that returns a value.</xsd:documentation>
  666. </xsd:annotation>
  667. <xsd:complexType>
  668. <xsd:complexContent>
  669. <xsd:extension base="objectType">
  670. <xsd:sequence>
  671. <xsd:element name="expression" type="xsd:string" minOccurs="1" maxOccurs="1"/>
  672. <xsd:element name="datatype" type="xsd:string" minOccurs="0"/>
  673. <xsd:element name="datatypeCategory" minOccurs="0">
  674. <xsd:annotation>
  675. <xsd:documentation>High level datatype. </xsd:documentation>
  676. </xsd:annotation>
  677. <xsd:simpleType>
  678. <xsd:restriction base="xsd:NMTOKEN">
  679. <xsd:enumeration value="boolean"/>
  680. <xsd:enumeration value="string"/>
  681. <xsd:enumeration value="number"/>
  682. <xsd:enumeration value="datetime"/>
  683. <xsd:enumeration value="interval"/>
  684. <xsd:enumeration value="array"/>
  685. <xsd:enumeration value="object"/>
  686. <xsd:enumeration value="period"/>
  687. </xsd:restriction>
  688. </xsd:simpleType>
  689. </xsd:element>
  690. <xsd:element name="usage" default="automatic" minOccurs="0">
  691. <xsd:annotation>
  692. <xsd:documentation>Defines the intended usage of the query item. </xsd:documentation>
  693. </xsd:annotation>
  694. <xsd:simpleType>
  695. <xsd:restriction base="xsd:NMTOKEN">
  696. <xsd:enumeration value="automatic">
  697. <xsd:annotation>
  698. <xsd:documentation>Specifies that the usage is not known.</xsd:documentation>
  699. </xsd:annotation>
  700. </xsd:enumeration>
  701. <xsd:enumeration value="identifier">
  702. <xsd:annotation>
  703. <xsd:documentation>Specifies that the object is to be treated as an identifier.</xsd:documentation>
  704. </xsd:annotation>
  705. </xsd:enumeration>
  706. <xsd:enumeration value="fact">
  707. <xsd:annotation>
  708. <xsd:documentation>Specifies that the object is to be treated as a fact.</xsd:documentation>
  709. </xsd:annotation>
  710. </xsd:enumeration>
  711. <xsd:enumeration value="attribute">
  712. <xsd:annotation>
  713. <xsd:documentation>Specifies that the object is to be treated as an attribute.</xsd:documentation>
  714. </xsd:annotation>
  715. </xsd:enumeration>
  716. </xsd:restriction>
  717. </xsd:simpleType>
  718. </xsd:element>
  719. <xsd:element name="facetDefinition" type="facetType" minOccurs="0" maxOccurs="1">
  720. <xsd:annotation>
  721. <xsd:documentation>If facetDefinition is absent, treat it as automatic (see enabled in facetType).</xsd:documentation>
  722. </xsd:annotation>
  723. </xsd:element>
  724. <xsd:element name="regularAggregate" type="regularAggregateType" default="automatic" minOccurs="0" maxOccurs="1">
  725. <xsd:annotation>
  726. <xsd:documentation>
  727. <para>Specifies the aggregation rule.</para>
  728. </xsd:documentation>
  729. </xsd:annotation>
  730. </xsd:element>
  731. </xsd:sequence>
  732. </xsd:extension>
  733. </xsd:complexContent>
  734. </xsd:complexType>
  735. </xsd:element>
  736. <xsd:element name="filter">
  737. <xsd:annotation>
  738. <xsd:documentation>Specifies an expression used to query the data in the specified database.</xsd:documentation>
  739. </xsd:annotation>
  740. <xsd:complexType>
  741. <xsd:complexContent>
  742. <xsd:extension base="objectType">
  743. <xsd:sequence>
  744. <xsd:element name="expression" type="xsd:string" minOccurs="1" maxOccurs="1"/>
  745. <xsd:element name="postAutoAggregation" type="xsd:boolean" default="false" minOccurs="0" maxOccurs="1"/>
  746. </xsd:sequence>
  747. </xsd:extension>
  748. </xsd:complexContent>
  749. </xsd:complexType>
  750. </xsd:element>
  751. <xsd:element name="drillGroup">
  752. <xsd:annotation>
  753. <xsd:documentation>represents a set of items related to each other as “coarse to finer”.</xsd:documentation>
  754. </xsd:annotation>
  755. <xsd:complexType>
  756. <xsd:complexContent>
  757. <xsd:extension base="objectType">
  758. <xsd:sequence>
  759. <xsd:element name="segment" minOccurs="1" maxOccurs="unbounded">
  760. <xsd:annotation>
  761. <xsd:documentation>represents an item in drillGroup.</xsd:documentation>
  762. </xsd:annotation>
  763. <xsd:complexType>
  764. <xsd:complexContent>
  765. <xsd:extension base="objectType">
  766. <xsd:sequence>
  767. <xsd:element name="ref" type="xsd:string" minOccurs="1" maxOccurs="1">
  768. <xsd:annotation>
  769. <xsd:documentation>reference to a query item in the same module.</xsd:documentation>
  770. </xsd:annotation>
  771. </xsd:element>
  772. </xsd:sequence>
  773. </xsd:extension>
  774. </xsd:complexContent>
  775. </xsd:complexType>
  776. </xsd:element>
  777. </xsd:sequence>
  778. </xsd:extension>
  779. </xsd:complexContent>
  780. </xsd:complexType>
  781. </xsd:element>
  782. <xsd:complexType name="splitType">
  783. <xsd:sequence>
  784. <xsd:element name="columnTreatment" minOccurs="1" maxOccurs="1">
  785. <xsd:simpleType>
  786. <xsd:restriction base="xsd:string">
  787. <xsd:enumeration value="show"></xsd:enumeration>
  788. <xsd:enumeration value="hide"></xsd:enumeration>
  789. </xsd:restriction>
  790. </xsd:simpleType>
  791. </xsd:element>
  792. <xsd:element name="display" minOccurs="1" maxOccurs="1">
  793. <xsd:simpleType>
  794. <xsd:restriction base="xsd:string">
  795. <xsd:enumeration value="inline"></xsd:enumeration>
  796. <xsd:enumeration value="folder"></xsd:enumeration>
  797. </xsd:restriction>
  798. </xsd:simpleType>
  799. </xsd:element>
  800. <xsd:element name="folderLabel" type="xsd:string" minOccurs="0" maxOccurs="1"></xsd:element>
  801. <xsd:element name="ref" type="xsd:string" minOccurs="1" maxOccurs="1">
  802. <xsd:annotation>
  803. <xsd:documentation>Reference to table that defines the columns to be split into</xsd:documentation>
  804. </xsd:annotation>
  805. </xsd:element>
  806. <xsd:element name="relationshipRef" type="xsd:string" minOccurs="0" maxOccurs="1"></xsd:element>
  807. <xsd:element name="columnsToShow" type="xsd:string" minOccurs="1" maxOccurs="unbounded"></xsd:element>
  808. </xsd:sequence>
  809. </xsd:complexType>
  810. <xsd:complexType name="taxonomyType">
  811. <xsd:sequence>
  812. <xsd:element name="domain" minOccurs="1" maxOccurs="1">
  813. <xsd:simpleType>
  814. <xsd:restriction base="xsd:string">
  815. <xsd:enumeration value="cognos" />
  816. </xsd:restriction>
  817. </xsd:simpleType>
  818. </xsd:element>
  819. <xsd:element name="class" minOccurs="1" maxOccurs="1">
  820. <xsd:simpleType>
  821. <xsd:restriction base="xsd:string">
  822. <xsd:enumeration value="cNone" />
  823. <xsd:enumeration value="cTime" />
  824. <xsd:enumeration value="cGeoLocation" />
  825. </xsd:restriction>
  826. </xsd:simpleType>
  827. </xsd:element>
  828. <xsd:element name="family" minOccurs="1" maxOccurs="1">
  829. <xsd:simpleType>
  830. <xsd:restriction base="xsd:string">
  831. <xsd:enumeration value="cNone" />
  832. <xsd:enumeration value="cDate" />
  833. <xsd:enumeration value="cYear" />
  834. <xsd:enumeration value="cQuarter" />
  835. <xsd:enumeration value="cSeason" />
  836. <xsd:enumeration value="cMonth" />
  837. <xsd:enumeration value="cWeek" />
  838. <xsd:enumeration value="cDay" />
  839. <xsd:enumeration value="cHour" />
  840. <xsd:enumeration value="cMinute" />
  841. <xsd:enumeration value="cSecond" />
  842. <xsd:enumeration value="cContinent" />
  843. <xsd:enumeration value="cSubContinent" />
  844. <xsd:enumeration value="cCountry" />
  845. <xsd:enumeration value="cRegion" />
  846. <xsd:enumeration value="cStateProvince" />
  847. <xsd:enumeration value="cCounty" />
  848. <xsd:enumeration value="cCity" />
  849. <xsd:enumeration value="cPostalCode" />
  850. <xsd:enumeration value="cStreetAddress" />
  851. <xsd:enumeration value="cPosition" />
  852. </xsd:restriction>
  853. </xsd:simpleType>
  854. </xsd:element>
  855. </xsd:sequence>
  856. </xsd:complexType>
  857. </xsd:schema>