Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
v-chen_data committed Sep 27, 2024
1 parent 2cb38b5 commit ae1810a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion llmfoundry/command_utils/data_prep/convert_delta_to_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,14 @@ def run_query(
spark: Optional['SparkSession'] = None,
collect: bool = True,
) -> Optional[Union[list['Row'], 'DataFrame', 'SparkDataFrame']]:
"""Run SQL query via databricks-connect or databricks-sql."""
"""Run SQL query via databricks-connect or databricks-sql.
Args:
query (str): sql query
method (str): select from dbsql and dbconnect
cursor (Optional[Cursor]): connection.cursor
spark (Optional[SparkSession]): spark session
collect (bool): whether to get the underlying data from spark dataframe
"""
if method == 'dbsql':
if cursor is None:
raise ValueError(f'cursor cannot be None if using method dbsql')
Expand Down

0 comments on commit ae1810a

Please sign in to comment.