Area: UI
Sub-Area: View Definitions
Applies to: OSS + Cloud
Issue
The View Definition code block in a dataset's sidebar looks cut off. You see only part of the SQL for a view and want the whole definition.
You Might Be Asking
- Where can I see the full SQL of a view?
- Why can't I see the view definition at all?
- Is there a "Show More" or "Show Less" button for view definitions?
Cause
The sidebar code block has a maximum height of 320 pixels. When the SQL is longer, the block scrolls instead of growing. It is not a one-line truncation. There is no "Show More" / "Show Less" or expand/collapse control for view definitions.
If you see no SQL at all, you may lack the View Entity Queries privilege. Without it, the View Definition section does not appear in the sidebar. On the dataset's View Definition tab, you see the Logic heading and the message "You don't have permission to view the SQL logic for this view."
Solution
- Scroll inside the code block in the dataset sidebar to read the rest of the SQL. The block wraps long lines and has a copy button.
- To see the whole definition, open the dataset's View Definition tab. The tab appears when the dataset has view properties or the View subtype. It shows a Details section, including whether the view is materialized, and a Logic section with the SQL.
- On embedded pages only, the sidebar also shows a See Full button. It opens the View Definition tab in a new window.
- When a formatted version of the SQL is available, a toggle switches between the two versions. For dbt views the options are Source and Compiled. For other views they are Raw and Formatted. If no formatted version is stored, you see only the original SQL and no toggle. The DataHub UI highlights the SQL in your browser.
- If you can't see the SQL, ask a DataHub admin to grant you the View Entity Queries privilege. See Policies and privileges.
If the sidebar still seems wrong after these steps, upgrade to the latest release. On Cloud, contact DataHub Support.