Creating a NDT column by concatenating two fields

sundarn
Participant I

Hello, 

I want to create a column in an NDT that concatenates two fields. 

view: ndt_sessions {
  derived_table: {
   explore_source: sessions {
      column: website_name {}
      column: partition_date {}
      column: id {}
}
}
}

I want to derive the column id{} from two fields fullvisitorid and visitid that are not in the table yet. 

Can I create the column id as a concatenation of the fields fullvisitorid and visitid without adding these two fields as columns in the table? Or do I have to bring those two into the table and then derive the id column?
    

0 2 188
2 REPLIES 2

Hiya!

Indeed, we need to have the columns already specified in order to be able t ouse them in the derived column. https://docs.looker.com/data-modeling/learning-lookml/creating-ndts#creating_derived_columns_for_cal...

The custom dimension functionality that can be used in the explore itself to derive a dimension from fields not selected, is not currently supported for the ndts (neither for aggregate tables).

So yes, you have to bring those two into the table and then derive the id column

sundarn
Participant I

Thank you @olga1 for the clear explanation. 

Top Labels in this Space
Top Solution Authors