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

[FEATURE] Use configuration from query file header #114

Closed JCZuurmond closed 3 months ago

JCZuurmond commented 3 months ago

A user can define configuration parameters in the query header. The configuration is stated in the commented lines in the header.

JCZuurmond commented 3 months ago

@nfx : Have you settled on a preferred format for the configuration? I am leaning towards argparse:

-- --width 10 --height 3
*/
--width 10 --height 3
/*  

IMO json is to verbose and yaml covers too many lines. Also, I prefer argparse over custom parsing like the one in ucx

nfx commented 3 months ago

@JCZuurmond let's go with argparse, it's good enough for what we need. /* --width 10 --height 3 */