File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -386,8 +386,7 @@ def get_tables(ds: CoreDatasource):
386386 password = conf .password ,
387387 options = f"-c statement_timeout={ conf .timeout * 1000 } " ,
388388 ** extra_config_dict ) as conn , conn .cursor () as cursor :
389- # Use parameterized query for security
390- cursor .execute (sql , (sql_param ,))
389+ cursor .execute (sql .format (sql_param ))
391390 res = cursor .fetchall ()
392391 res_list = [TableSchema (* item ) for item in res ]
393392 return res_list
@@ -438,8 +437,7 @@ def get_fields(ds: CoreDatasource, table_name: str = None):
438437 password = conf .password ,
439438 options = f"-c statement_timeout={ conf .timeout * 1000 } " ,
440439 ** extra_config_dict ) as conn , conn .cursor () as cursor :
441- # Use parameterized query for security
442- cursor .execute (sql , (p1 , p2 ))
440+ cursor .execute (sql .format (p1 , p2 ))
443441 res = cursor .fetchall ()
444442 res_list = [ColumnSchema (* item ) for item in res ]
445443 return res_list
You can’t perform that action at this time.
0 commit comments