databricks-sql-cli
databricks-sql-cli copied to clipboard
Support for Parameter Markers
It doesn't look like databricks-sql-cli supports passing parameter markers, though the Databricks CLI supports them (example here).
Would you consider adding?
sqlexecute.py:131 calls databricks.cursor.execute(query)
The cursor.execute method (databricks/sql/client.py:453) signature accepts an optional parameter dictionary:
def execute(
self, operation: str, parameters: Optional[Dict[str, str]] = None
) -> "Cursor":
It would be great if there were some way to create the dictionary from the command line (string, json, or a reference to a file with key,value pairs). My preference would be:
python -m dbsqlcli.main -e "SELECT col1 + :o1, col2 + :o2 FROM my_table" -params "o1=1;o2=2"