A square-bracketed list of dimensions and/or measures
Definition
The required_fields parameter lets you pull additional fields into a query when a user chooses a specific field. In this example, when the user chooses the Linked Name dimension, the url field is also pulled into the query:
Although the required fields are added to the query, they do not display to the user. If the required fields change the aggregation of the query, it can be confusing for the user.
The LookML example that shows url as the required field will likely work because there will likely be the same number of unique website names and website URLs. However, if the data listed several URLs for the same website name (such as naming both google.com and google.com/news as Google), then there could be multiple rows that have the same name but different underlying URLs. Looker typically collapses identical names into one row, but it won't do so in this case because Looker is acting as if the url field was also added.
[[["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,["# required_fields\n\n\u003cbr /\u003e\n\nUsage\n-----\n\n```\nview: view_name {\n measure: field_name {\n required_fields: [field_name, field_name, …]\n }\n}\n```\n\nDefinition\n----------\n\nThe `required_fields` parameter lets you pull additional fields into a query when a user chooses a specific field. In this example, when the user chooses the **Linked Name** dimension, the `url` field is also pulled into the query: \n\n dimension: linked_name {\n sql: ${name} ;;\n html: \u003ca href=\"{{ row['websites.url'] }}\" target=\"_new\"\u003e{{ value }}\u003c/a\u003e ;;\n required_fields: [url]\n }\n\nAlthough the required fields are added to the query, *they do not display to the user*. If the required fields change the aggregation of the query, it can be confusing for the user.\n\nThe LookML example that shows `url` as the required field will likely work because there will likely be the same number of unique website names and website URLs. However, if the data listed several URLs for the same website name (such as naming both `google.com` and `google.com/news` as **Google** ), then there could be multiple rows that have the same name but different underlying URLs. Looker typically collapses identical names into one row, but it won't do so in this case because Looker is acting as if the `url` field was also added."]]