CybercentreCanada / jupyterlab-sql-editor

A JupyterLab extension providing, SQL formatter, auto-completion, syntax highlighting, Spark SQL and Trino
BSD 3-Clause "New" or "Revised" License
83 stars 13 forks source link

--refresh all | local option should be a single option #139

Closed cccs-eric closed 9 months ago

cccs-eric commented 10 months ago

When someone calls --refresh local and --refresh all was never called (so the JSON file does not exist), --refresh local will failed: FileNotFoundError: [Errno 2] No such file or directory: '/home/jovyan/.local/sparkdb.schema.json' To fix this, the user needs to call --refresh all first to have the JSON file created. In my opinion, there should only be --refresh and the code should check if the JSON file exist. If it does, do a local refresh. If it doesn't, do all.