concat expression of function ?

9 views
Skip to first unread message

Marcello Giovagnoli

unread,
Dec 31, 2018, 2:58:29 AM12/31/18
to cubes-...@googlegroups.com
Hi guys,
I would like to know if there is a way to define an attribute in one dimension where its label (label_attribute) would be a concat of two columns, so that it is interpreted by sql engine as:

concat (lastname, “ ", firstname) as fullname

For example I have in my model:

……...

"name":"employees",
        "label": “Employees",
        "levels": [
               {
                   "name”:"employee",
                   "label”:"Employee",
                   "attributes": ["id", "lastname", "firstname"],
                   "label_attribute":"lastname"                           
               }
           ]
       },

It could be something like:

"label_attribute”:{“expression”:  “concat(employees.lastname, ‘  ‘ , employees.firstname)”}

or even in another way, the important thing is that I can use the concat function on the joined table instead of adding a column named fullname in the fact table.

José Juan Montes

unread,
Dec 31, 2018, 11:07:22 AM12/31/18
to cubes-...@googlegroups.com

No, Cubes does not support that.

The usual approach is to use database views or to go with a complete ETL process transforming your data for analytic purposes.

Regards,

Jose Juan Montes


--
You received this message because you are subscribed to the Google Groups "Cubes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cubes-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages