Python API: TIP when building queries using the CSV fallback


I noticed when running queries through the Python API, using Dimensions and KPIs, and without the PyOrc loader installed, I sometimes get more (and empty) columns then requested.

Suspected cause: split on ‘,’, which fails if a , is also in the column name

Solution: provide a column name (2nd argument for the KPI/Dimension function) to prevent this issue.

Side effects: not sure yet what happens if there is a , in your values, likely to cause issues however!

1 Like