In queryservice module for createSchedule, the `sql` statement should not be passed if template ID is passed
cmenguy opened this issue · comments
Currently createSchedule
requires sql
param to be passed. However that seems incorrect because templateId
can be passed in which case the sql
is not needed.
In fact currently specifying both sql
and templateId
causes an error in PQS, see below:
{'message': 'requirement failed: Only one of sql and templateId must be defined',
'statusCode': 400}
We should accept calling this function as valid if templateId
is passed without sql
. In the meantime we can still use the full object.
Thanks!
I changed that and it will be in the release tomorrow.
The condition has been changed :
if name is None or (sql is None and templateId is None) or schedule is None:
raise Exception(
"Expecting either scheduleQUery dictionary or data in parameters"
)
fyi : This issue also probably apply in the postQueries
method. I fixed it at the same time.
Release on 0.2.6 (now available on pypi)