-6
我有python下面的需求,我需要在運行時傳遞日期和id。python替換字符串中的佔位符值
query_str="select * from test_table where data_date = '${data_date}' and id = ${id}"
Where data_date is string column and id is big int column.
如果我傳遞data_date爲2015-01-01和id爲1,它應該替換下面的參數。
Output : select * from test_table where data_date = '2015-01-01' and id = 1
這需要[mcve]。 –