Issue with custom tables and ui api

Decided to update my forks today to the latest and greatest pioreactor release.

had an issue with my custom tables/charts. Logger reported the following error:
pio get fallback time series no such column: channel

Didnt dig too deep but issue seemed to be coming from this recent change:

I just reverted it on my end in the meantime and it fixed the issue.

Its almost like it requires table to have a channel column. But I did notice that the stock tables that did not have a channel column were still plotting correctly. Maybe its an issue with how I set up my custom tables.

Oh yea, I see the error in that PR now. Yea channel shouldn’t be there:

SELECT pioreactor_unit as unit

I’ll fix now: fix errant channel · Pioreactor/pioreactorui@44b650a · GitHub

2 Likes

Sorry this is totally my fault, I think I copy-pasted the wrong thing for the pull request, on my pioreactor I have:

query = f"“”
SELECT
json_object(‘series’, json_group_array(unit), ‘data’, json_group_array(json(data))) as result
FROM (
SELECT pioreactor_unit as unit,
json_group_array(json_object(‘x’, timestamp, ‘y’, round({column}, 7))) as data
FROM {data_source}
WHERE experiment=?
AND ((ROWID * 0.61803398875) - cast(ROWID * 0.61803398875 as int) < 1.0/?) – Downsampling logic based on filter_mod_n
AND timestamp > strftime(‘%Y-%m-%dT%H:%M:%S’, datetime(‘now’, ?))
GROUP BY 1
);
“”"

I think for the merge I just copied the whole SQL text over from the non-fallback function rather than only the sampling bit.

Thanks for spotting @rafik.n !

2 Likes