Need the include statement in my view file, but the include statement prevents validation

Hi,

I received this error: No such explore "ndt_pageview_v2u_explore", so in the view file I added include: "<location_of_explore>.model".

The error went away, but when I validated my LookML it told me This "connection" is overridden by a "connection" declared in a file included below.

So my problem is it seems I need the include statement in my view file, but the include statement prevents validation. What do I do here?

Thanks,
Tim

0 5 823
5 REPLIES 5

Hello @tcheung !

If you include a model in another model, you’ll have a connection error.
I think creating a generic lkml file (something like ndt_pageview_v2u_explore.explore.lkml) could solve your issue but to be sure can you share some more details?

What is the type of file where you get this error? A model, a view?

Thanks Cyril!

I see this error (No such explore “ndt_pageview_v2u_explore”) in an explore built on that NDT (ndt_pageview_v2u.view.lkml)

ndt_pageview_v2u.view.lkml is built off of another explore that joins a couple different views and looks like this:

view: ndt_pageview_v2u {
  derived_table: {
    explore_source: ndt_pageview_v2u_explore {
      column: pageview_id {field: ndt_pageview_v2u_explore.pageview_id}
      column: count_visitors {field: ndt_pageview_v2u_explore.count_visitors}
      column: count_upgrades_90_days {field: rs_report_systems.count_upgrades_90_days}
    }
  }

  dimension: pageview_id {
    type: string
    hidden: yes
  }

  measure: count_visitors {
    type: sum
    hidden: yes
  }

  measure: count_upgrades_90_days {
    type: sum
    hidden: yes
  }
  
  measure: visitor_to_upgrade_rate_90_days {
    type: number
    sql: ${count_upgrades_90_days} * 1.0 / ${count_visitors} ;;
  }

}

My goal here is to make visitor_to_upgrade_rate_90_days, which is a calculation with measures from different views, an available field in the final user-facing explore. I opted not to use Table Calculations because I want it to be available for a user to select and use from the dropdown of measures in the final explore.

Thanks,
Tim

Hey @tcheung.

Can you now share the model files where you have the explores ndt_pageview_v2u_explore and ndt_pageview_v2u?

I have a feeling that there is mix up somewhere.

OK I managed to resolve this. The ndt_pageview_v2u_explore was located in a separate model file, <helper_explores>.model. I moved the explore back into the main model file, and the error went away.

Thanks for your help!

Excellent News!

Top Labels in this Space
Top Solution Authors