【发布时间】:2016-07-08 18:26:29
【问题描述】:
我在 python 中有以下要求,我需要在运行时传递日期和 ID。
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
【问题讨论】:
标签: python