datahub icon indicating copy to clipboard operation
datahub copied to clipboard

Looker/Lookml ingestion doesn't support view inheritance

Open pedro-iatzky opened this issue 1 year ago • 2 comments

Describe the bug Looker/Lookml ingestion does not handle inheritance correctly. When I extract a view that is extending another the child view does not show the parent dimensions/measures.

To Reproduce Steps to reproduce the behavior:

  1. Create the following file in Lookml
explore: datahub_test {
  view_name: child_view
}

view: parent_view {
  sql_table_name: `dataset.table` ;;

  dimension: id {
    primary_key: yes
    type: string
    sql: ${TABLE}.id ;;
  }

  dimension: parent_dimension_1 {
    type: string
    sql: ${TABLE}.parent_dimension_1 ;;
  }

  measure: parent_count {
    type: count
  }
}

view: child_view {
  extends: [parent_view]

  dimension: child_dimension_1 {
    type: string
    sql: ${TABLE}.child_dimension_1 ;;
  }
}
  1. Run Lookml & Looker ingestion

Expected behavior I would expect to see two views extracted. The parent, and the child. Also, the child_view should show the dimensions/measures inherited from parent

Screenshots

image

Additional context Datahub version: v0.12.0

pedro-iatzky avatar Dec 14 '23 17:12 pedro-iatzky

This issue is stale because it has been open for 30 days with no activity. If you believe this is still an issue on the latest DataHub release please leave a comment with the version that you tested it with. If this is a question/discussion please head to https://slack.datahubproject.io. For feature requests please use https://feature-requests.datahubproject.io

github-actions[bot] avatar Feb 04 '24 01:02 github-actions[bot]

This seems like a bug in get_including_extends - for "list" fields like dimension/measure/etc, we need to merge with parent views instead of only fetching the value for the child field

hsheth2 avatar Feb 07 '24 01:02 hsheth2

This issue is stale because it has been open for 30 days with no activity. If you believe this is still an issue on the latest DataHub release please leave a comment with the version that you tested it with. If this is a question/discussion please head to https://slack.datahubproject.io. For feature requests please use https://feature-requests.datahubproject.io

github-actions[bot] avatar Mar 08 '24 01:03 github-actions[bot]