You are not logged in.

Dear visitor, welcome to Palo Community Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

mgergele

Trainee

  • "mgergele" started this thread

Posts: 3

Date of registration: Feb 2nd 2009

  • Send private message

1

Tuesday, February 3rd 2009, 12:37pm

Tree as a Dimension

I couldn't find an example how to bind an input to a tree-dimension. I create the select

<sources>
<source name="DBC_DB" type="SQL">
<connection nameref="direkt" />
<query>select country, city, value from myTable
</query>
<alias_map>
<alias name="Country">1</alias>
<alias name="City">2</alias>
<alias name="Value">3</alias>
</alias_map>
</source>
</sources>

Then I create a pipeline to initialize the tree

<pipelines>
<pipeline name="Location">
<sources>
<source nameref="DBC_DB"/>
</sources>
<target name="Location" type="Tree">
<levels>
<level>
<input nameref="Country" />
</level>
<level>
<input nameref="City" />
</level>
</levels>
</target>
</pipeline>
</pipelines>

I can create the dimension via

<exports>
<export type="Dimension" mode="CREATE" name="Location">
<connection nameref="palodemo"/>
<source nameref="Location"/>
</export>

But when I try to connect "Location" in my data-reading, it doesn't work:

<pipeline>
<sources>
<source nameref="DBC_DB"/>
</sources>
<target name="BuchETL" type="Table">
<coordinates>
<coordinate>
<input nameref="Location"/>
</coordinate>
</coordinates>
<measures name="Measures" aggregate="sum">
<measure name="Valu">
<input nameref="Value"/>
</measure>
</measures>
</target>
</pipeline>

So how do I connect the pipeline "Location" to the dimension "Location"? It should be quite simple, because it's all about connecting Pipelines, but I don't get it.

Thanks for any help - Marco.

mgergele

Trainee

  • "mgergele" started this thread

Posts: 3

Date of registration: Feb 2nd 2009

  • Send private message

2

Thursday, February 5th 2009, 9:12am

Tree-Dimension solved

OK, the point is that PALO doesn't see the whole path as an alement, but the leafes have to be unique. So instead of the hierarchie

Typ: City, Name: A
Typ: City, Name: B
Typ: Village, Name: A
Typ: Village, Name: B

where village B is different from City B,

for Palo it has to be

Typ: City, Name: City-A
Typ: City, Name: City-B
Typ: Village, Name: Village-A
Typ: Village, Name: Village-B

or one has to cope with the ids and lookup/properties. But with ids the problem occurs that the id of a city/village must not be equal to a id of any other column.

Posts: 173

Date of registration: Jan 4th 2008

Location: Freiburg / Germany

  • Send private message

3

Monday, February 23rd 2009, 11:52am

RE: Tree-Dimension solved

Concerning the 1st problem:
In the pipeline of type "table" you have to reference a column of your input and rename it with you dimension name:

Instead of:
<coordinate>
<input nameref="Location"/>
</coordinate>

it has to be:
<coordinate name="Location">
<input nameref="City"/>
</coordinate>

Rate this thread