Add ability to return Postgres cursor description#44
Conversation
fatimarahman
left a comment
There was a problem hiding this comment.
Looks good! Can you elaborate more on how the cursor description will be used? Still unclear on how you'll use it in Data Viz
Each visualized metrics is stored as a table with two required columns (the date and the value). Each of the remaining columns corresponds to a filter. The viz layer has no idea what metrics have what filters -- this is by design so that STRAD can upload files with whatever filters they like without having to ask us to make manual changes to the tables first -- so it's querying for all the columns in the table every time. Hence, in order to display the columns correctly, the viz layer has to essentially use the name of the column as the filter id. Separately, files are provided that map from these filter ids to various pieces of text. Of course it's possible to query separately for the names of the columns but it seemed unnecessary to me when the cursor description already provides that information. |
The cursor description contains the column names, which are necessary for loading the data correctly in the Data Viz project.