How to get query preview from external

Preview query is a nice feature in Dremio UI to test query before making a full run. But, how to get the same preview when querying from external? Apparently invoking “limit” (e.g. select * from schema.table limit 10) in SQL is not helpful.
Any idea?

Thx

Hi @chafidz,

What client tool are you using to query Dremio?

Hi @ben, I’m using DBeaver 5.3.5 with JDBC 3.0.6

You can always add LIMIT 1000 to the end of your query.

@chafidz,

I agree with @kelly here, the LIMIT seems like that best method. Was this not performant for you?

My bad, it seems that my question wasn’t clear.

I was trying to preview data from a data set. The data set doesn’t have a single reflection yet created due to its potential size (still working for the best strategy). Using limit on said data set still triggering a complete planning from the data source before reaching the “limit” by querying via external. Meanwhile there is no obstacles from previewing its content from Web UI.

@chafidz our UI previews have special logic to apply "limit"s at the table scan level (i.e. work on sample of the data) before Dremio processes rest of the query to optimize for speed, which also means preview results will not be meaningful/correct as they include only a subset. This capability is unfortunately not available via ODBC/JDBC.

1 Like