-
-
Save jazzido/62f1d20986360b9d7c42 to your computer and use it in GitHub Desktop.
Schema definition — http://lists.pentaho.org/pipermail/mondrian/2015-November/005277.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<Schema name="aggregator"> | |
<Dimension name="Fecha" type="TimeDimension"> | |
<Hierarchy hasAll="true" primaryKey="id"> | |
<Table name="dim_date" schema="datasets"/> | |
<Level column="year" levelType="TimeYears" name="Year" type="Numeric" uniqueMembers="true"/> | |
<Level column="month" levelType="TimeMonths" name="Month" type="Numeric" uniqueMembers="false"> | |
<CaptionExpression><SQL>month || '/' || year</SQL></CaptionExpression> | |
</Level> | |
<Level column="day" levelType="TimeDays" name="Day" type="Numeric" uniqueMembers="false"> | |
<CaptionExpression><SQL>day || '/' || month || '/' || year</SQL></CaptionExpression> | |
</Level> </Hierarchy> | |
</Dimension> | |
<Cube name="dataset_ejecucion_gastos_bahia_user_bahia"> | |
<Table name="dataset_ejecucion_gastos_bahia_user_bahia" schema="datasets" /> | |
<Dimension name="Jurisdicciones"> | |
<Hierarchy allMemberName="Jurisdicciones" hasAll="true"> | |
<Level column="jurisdiccion" name="Jurisdiccion" nameColumn="deno_jurisdiccion" uniqueMembers="true"/> | |
<Level name="Programa" nameColumn="deno_programa" uniqueMembers="true"> | |
<KeyExpression><SQL dialect="postgres">(jurisdiccion || '-' || programa)</SQL></KeyExpression> | |
</Level> | |
<Level column="activ_proy" name="Proyecto" nameColumn="deno_proyecto" uniqueMembers="true"> | |
<KeyExpression><SQL dialect="postgres">(jurisdiccion || '-' || programa || '-' || activ_proy)</SQL></KeyExpression> | |
</Level> | |
</Hierarchy> | |
</Dimension> | |
<Dimension name="Objeto del Gasto"> | |
<Hierarchy allMemberName="Objeto del Gasto" hasAll="true"> | |
<Level column="inciso" name="Inciso" nameColumn="deno_inciso" uniqueMembers="true"/> | |
<Level name="Partida Principal" nameColumn="deno_par_prin" uniqueMembers="false"> | |
<KeyExpression><SQL dialect="postgres">(inciso || '.' || par_prin)</SQL></KeyExpression> | |
</Level> | |
<Level name="Partida Parcial" nameColumn="deno_par_parc" uniqueMembers="false"> | |
<KeyExpression><SQL dialect="postgres">(inciso || '.' || par_prin || '.' || par_parc)</SQL></KeyExpression> | |
</Level> | |
</Hierarchy> | |
</Dimension> | |
<Dimension name="Fuente de Financiamiento"> | |
<Hierarchy allMemberName="Fuente de Financiamiento" hasAll="true"> | |
<Level column="codigo_ff" name="Fuente de Financiamiento" nameColumn="deno_ff" uniqueMembers="true"/> | |
</Hierarchy> | |
</Dimension> | |
<Dimension name="Finalidad y Funcion"> | |
<Hierarchy allMemberName="Finalidad y Funcion" hasAll="true"> | |
<Level name="Finalidad" column="finalidad" nameColumn="deno_finalidad" hideMemberIf="IfBlankName" /> | |
<Level name="Funcion" nameColumn="deno_funcion" hideMemberIf="IfBlankName"> | |
<KeyExpression><SQL dialect="postgres">(finalidad || '.' || funcion)</SQL></KeyExpression> | |
</Level> | |
</Hierarchy> | |
</Dimension> | |
<DimensionUsage foreignKey="_date_id" source="Fecha" name="Fecha" /> | |
<Measure visible="false" aggregator="sum" column="credito_aprobado" name="Credito Aprobado Interno"/> | |
<Measure visible="false" aggregator="sum" column="modificaciones" name="Modificaciones Interno"/> | |
<Measure visible="false" aggregator="sum" column="devengado" name="Devengado Interno"/> | |
<Measure visible="false" aggregator="sum" column="pagado" name="Pagado Interno"/> | |
<Measure visible="false" aggregator="sum" column="vigente" name="Credito Vigente Interno"/> | |
<CalculatedMember name="Vigente" dimension="Measures" caption="Vigente"> | |
<Annotations> | |
<Annotation name="default">true</Annotation> | |
</Annotations> | |
<Formula> ([Measures].[Credito Vigente Interno], LastNonEmpty(Descendants([Fecha].CurrentMember), [Measures].[Credito Vigente Interno]))</Formula> | |
</CalculatedMember> | |
<CalculatedMember name="Aprobado" dimension="Measures" caption="Aprobado"> | |
<Formula> ([Measures].[Credito Aprobado Interno], LastNonEmpty(Descendants([Fecha].CurrentMember), [Measures].[Credito Aprobado Interno]))</Formula> | |
</CalculatedMember> | |
<CalculatedMember name="Devengado" dimension="Measures" caption="Devengado"> | |
<Formula> ([Measures].[Devengado Interno], LastNonEmpty(Descendants([Fecha].CurrentMember), [Measures].[Devengado Interno]))</Formula> | |
</CalculatedMember> | |
<CalculatedMember name="Modificaciones" dimension="Measures" caption="Modificado"> | |
<Formula> ([Measures].[Modificaciones Interno], LastNonEmpty(Descendants([Fecha].CurrentMember), [Measures].[Modificaciones Interno]))</Formula> | |
</CalculatedMember> | |
</Cube> | |
</Schema> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment