The fanout_on parameter specifies the Google BigQuery Legacy SQL REPEATED subrecord on which a dimension or measure should fanout.
Google BigQuery Legacy SQL supports nested records in which a single record can hold multiple subrecords. Expressing these subrecords in Looker causes the result set to "fanout", which means that the parent record gets repeated multiple times. In order for Looker to properly associate the normal data with the repeated data, you can specify the fanout relationship of a subrecord using the fanout_on parameter.
Consider this example data table:
Column Name
Type
name
String, required
age
Integer, required
citiesLived
Record, repeated
citiesLived.place
String, nullable
citiesLived.numberOfYears
Integer, nullable
Data without the citiesLived record may look like this:
name
age
Wilbur Wright
45
However, adding the repeated citiesLived record causes a fanout, where the name and age data is repeated multiple times:
name
age
citiesLived.place
citiesLived.numberOfYears
Wilbur Wright
45
Dayton
40
Wilbur Wright
45
Paris
2
Wilbur Wright
45
Kitty Hawk
1
When modeling this type of data the citiesLived record causes the fanout, so it is used in the fanout_on parameter:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-14 UTC."],[],[],null,["# fanout_on\n\n\u003cbr /\u003e\n\nUsage\n-----\n\n```\nview: view_name {\n dimension: field_name {\n fanout_on: repeated_record_name\n }\n}\n```\n\nDefinition\n----------\n\nThe `fanout_on` parameter specifies the Google BigQuery Legacy SQL `REPEATED` subrecord on which a dimension or measure should fanout.\n\nGoogle BigQuery Legacy SQL supports nested records in which a single record can hold multiple subrecords. Expressing these subrecords in Looker causes the result set to \"fanout\", which means that the parent record gets repeated multiple times. In order for Looker to properly associate the normal data with the repeated data, you can specify the fanout relationship of a subrecord using the `fanout_on` parameter.\n\nConsider this example data table:\n\nData without the `citiesLived` record may look like this:\n\nHowever, adding the repeated `citiesLived` record causes a fanout, where the `name` and `age` data is repeated multiple times:\n\nWhen modeling this type of data the `citiesLived` record causes the fanout, so it is used in the `fanout_on` parameter: \n\n dimension: city_lived {\n sql: ${TABLE}.citiesLived.place ;;\n fanout_on: \"citiesLived\"\n }\n dimension: years_lived {\n sql: ${TABLE}.citiesLived.numberOfYears ;;\n fanout_on: \"citiesLived\"\n }\n measure: cities_count {\n type: count_distinct\n sql: ${city_lived} ;;\n fanout_on: \"citiesLived\"\n }\n measure: city_list {\n type: list\n list_field: city_lived\n fanout_on: \"citiesLived\"\n }\n\n-\n\nNote that both dimensions and measures must use `fanout_on` if they include a repeated record in their calculation."]]