In case of use of properties in the query, use this syntax : %%(Property String)s. Example : SELECT id FROM sale_order WHERE create_date > %%(Start Date)s