File tree 1 file changed +5
-1
lines changed
libs/foundry-dev-tools/src/foundry_dev_tools/resources
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -748,8 +748,12 @@ def query_foundry_sql(
748
748
>>> ds = ctx.get_dataset_by_path("/path/to/dataset")
749
749
>>> ds.query_foundry_sql("SELECT * WHERE a=1")
750
750
""" # noqa: E501
751
+ # This is a quick fix. Foundry Sql Server seems to decide that
752
+ # "FROM `rid` SELECT *" is not direct read eligible.
753
+ # tracking: ri.issues.main.issue.da8272ca-9e78-4100-af3f-6ac40aaecf51
754
+ query_string = f"SELECT * FROM `{ self .rid } `" if query == "SELECT *" else f"FROM `{ self .rid } ` { query } " # noqa: S608
751
755
return self ._context .foundry_sql_server .query_foundry_sql (
752
- f"FROM ` { self . rid } ` { query } " ,
756
+ query = query_string ,
753
757
return_type = return_type ,
754
758
branch = self .branch ["id" ],
755
759
sql_dialect = sql_dialect ,
You can’t perform that action at this time.
0 commit comments