In my config file I have a query that works fine on a postgres DB, but throws an error when executed by query-exporter.
Installation details
operating system: [RedHat 7.4]
To Reproduce
If possible, please provide detailed steps to reproduce the behavior:
The following is the relevant part of the config file:
WITH top_python_users AS (
SELECT
u.user_name,
SUM(j."gpuHours") AS total_gpuHours
FROM
jobs j
JOIN
users u ON j.user_name = u.user_name
JOIN
modules m ON j.job_id_date = m.job_id_date
WHERE
m.module = 'python' or m.module = 'conda' AND j.partition = 'a100'
AND j.start >= current_date - interval '6 months'
GROUP BY
u.user_name
ORDER BY
total_gpuHours DESC
)
SELECT
user_name AS "User",
total_gpuHours AS "Python_a100_6m"
FROM
top_python_users
ORDER BY
"Python_a100_6m" DESC
LIMIT 20;
and the AND j.start >= current_date - interval '6 months' line is what is causing the following error:
TypeError: unsupported operand type(s) for +=: 'float' and 'datetime.date'
In my config file I have a query that works fine on a postgres DB, but throws an error when executed by query-exporter.
Installation details
To Reproduce
If possible, please provide detailed steps to reproduce the behavior:
and the
AND j.start >= current_date - interval '6 months'
line is what is causing the following error:TypeError: unsupported operand type(s) for +=: 'float' and 'datetime.date'