We wish to obtain the top n or bottom n rows of a table. It is good practice to look at the top and bottom set of rows of a new table especially when the table is imported from a spreadsheet. Typically, encoding issues and non data content (e.g. comments) can be seen by inspecting those top or bottom n rows.
We wish to get the top n
rows of a table. The recommended method is using the Preview
tab in BigQuery console.
Using LIMIT
clause will scan the full table and will not necessarily return the top n rows.
We wish to get the bottom n
rows of a table.Similar to Head, the recommended method is using the Preview
tab in
BigQuery console. We can navigate to the last rows by using the buttons in the bottom right corner.