03. Data-Sources

Version 3 by Ian Birch
on Jun 15, 2011 19:34.

compared with
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (6)

View Page History
* authorisation controls for critical data elements have already been applied
* meaningful formats for data values have already been applied{info}
 

h3. Adding the Metadata Source

Select the "Add Data Sources" button in the toolbar, or right click with your mouse on the data-sources node to open up the context menu.
\\ !2. data - metadata choice.png|border=1!
 
Select the "Metadata" entry.
The "Domain Id / BI-Server Solution Name" is _always_ the name of the folder that your report will be stored in when it is delivered.  That's also the folder that contains the metadata.xmi file.  If you are delivering your report on a server you must use the name of the folder on the server.  So that you can test your report on a locally hosted Pentaho User Console you should use the same folder name locally. 
{warning}
The "Domain Id / BI-Server Solution Name" is _always_ the name of the folder that your report will be stored in when it is delivered.  That's also the folder that contains the metadata.xmi file.  If you are delivering your report on a server you must use the name of the folder on the server.  So that you can test your report on a locally hosted Pentaho User Console you should use the same folder name locally. 
 
Each metadata data source can hold multiple queries.  The metadata is shared between all queries. You can use meaningful names for the queries in the metadata source. 

Select this query name and click the edit button
\\ !3a. Metadata source editor - edit button.png|border=1!
 
Instead of typing SQL to create the query a query editor will open.

Click OK to return to the Data Source Editor, where you will see the query in the bottom window.
\\ !Metadata source editor - complete query.png|border=1!
 
Click on the Preview button to see what gets returned.  You should see this dialog:
 
{note:title=Formatting is inherited from the metadata}As you create your report you may find that the columns are already formatted (font size, colour, ...), and that you are unable to change this formatting. This is because these attributes are coming from the metadata description. You can override the attributes in the style table by unchecking the "Inherit" box. {note}
\\ !6. Report preview.png!