databrickslabs / lsql

Lightweight SQL execution wrapper only on top of Databricks SDK
https://pypi.org/project/databricks-labs-lsql/
Other
8 stars 3 forks source link

[TECH DEBT] Extracting fields from query with `*` #110

Closed JCZuurmond closed 2 months ago

JCZuurmond commented 3 months ago

Let's say a user wants to visualize a table from the following query: SELECT * FROM table. What do we do in such a case?

Options:

See extracting fields added in #111

JCZuurmond commented 3 months ago

@nfx : I am leaning towards logging a warning to user about the * and then trying to create a table with which ever columns are present next to the *. If there is only a * it will be an empty table.

Without database connection it will be impossible to infer the columns. Moreover, I want to nudge users to avoid using the *