CAVEconnectome/CAVEclient

live_query seems to ignore select_columns argument

Closed this issue · 2 comments

Not sure if I'm missing something here @fcollman?

>>> import numpy as np
>>> import datetime
>>> import pandas as pd
>>> from caveclient import CAVEclient
>>> datastack_name = "flywire_fafb_production"
>>> client = CAVEclient(datastack_name)
>>> timestamp_now = datetime.datetime.utcnow()
>>> synapse_table = client.info.get_datastack_info()['synapse_table']
>>> client.materialize.live_query(synapse_table, 
...   filter_in_dict = {"post_pt_root_id":[720575940628367836]},
...   select_columns=['id','pre_pt_root_id', 'pre_pt_position'],
...   timestamp=timestamp_now)
            id valid  ...           pre_pt_position          post_pt_position
0    108706552     t  ...  [635280, 149764, 179200]  [635368, 149800, 179160]
1    200645882     t  ...   [572136, 175236, 53080]   [572168, 175368, 53120]
2     18739404     t  ...  [661796, 108960, 166800]  [661776, 108848, 166800]
3    111298782     t  ...   [603680, 169528, 41440]   [603652, 169416, 41440]
4    176297821     t  ...   [615328, 159180, 43000]   [615336, 159120, 43040]
..         ...   ...  ...                       ...                       ...
296   22974406     t  ...  [635780, 150712, 177400]  [635836, 150628, 177400]
297  135783238     t  ...   [619072, 115700, 77200]   [618976, 115644, 77160]
298   22359966     t  ...  [659112, 139668, 177240]  [659196, 139656, 177200]
299   15709741     t  ...   [619888, 165572, 50800]   [619832, 165588, 50800]
300   22360025     t  ...  [659680, 140784, 177400]  [659640, 140640, 177400]

[301 rows x 17 columns]

whereas

>>> client.materialize.query_table(synapse_table,
...   filter_in_dict = {"post_pt_root_id":[720575940628367836]},
...   select_columns=['id','pre_pt_root_id', 'pre_pt_position'])
            id      pre_pt_root_id           pre_pt_position
0    108706552  720575940612574974  [635280, 149764, 179200]
1    200645882  720575940628367836   [572136, 175236, 53080]
2     18739404  720575940628367836  [661796, 108960, 166800]
3    111298782  720575940628367836   [603680, 169528, 41440]
4    176297821  720575940636057833   [615328, 159180, 43000]
..         ...                 ...                       ...
296   22974406  720575940625792711  [635780, 150712, 177400]
297  135783238  720575940625666325   [619072, 115700, 77200]
298   22359966  720575940611698483  [659112, 139668, 177240]
299   15709741  720575940624563075   [619888, 165572, 50800]
300   22360025  720575940611698483  [659680, 140784, 177400]

[301 rows x 3 columns]

This is fixed now in 5.4.1

Thanks was just checking in on this.