cloudyr / bigQueryR

R Interface with Google BigQuery
http://code.markedmondson.me/bigQueryR
Other
41 stars 21 forks source link

Edit Table Labels #58

Closed jordanwebb10 closed 5 years ago

jordanwebb10 commented 5 years ago

It would be helpful to be able to edit table labels through the API.

MarkEdmondson1234 commented 5 years ago

I just added the ability to do this actually, via bqr_patch_table(). Pass it a Table() object with the labels field

jordanwebb10 commented 5 years ago

Mark, that's great news! Thank you for your work.

I tried it and received the following error: 'Error: API returned: Either interval partition or range partition should be specified.'

Any idea what this is referencing to?

MarkEdmondson1234 commented 5 years ago

I think I would need to see some code, it sounds like you are sending in more than just labels?

MarkEdmondson1234 commented 5 years ago

Actually I found Table was setting that itself when it shouldn't have been, I corrected that so try it now with the fresh GitHub version.

jordanwebb10 commented 5 years ago

I just reinstalled from here. devtools::install_github("cloudyr/bigQueryR")

After authenticating I ran just this. Label deviceid currently exsists in the table bigQueryR::bqr_patch_table(bigQueryR::Table(projectId = 'ctpltraw', tableId = 'OneHundredHz', datasetId = 'msoc', labels = list(deviceid = c("11111"))))

jordanwebb10 commented 5 years ago

It works! Awesome, thank you. Anyidea when this will be integrated into the main package?

MarkEdmondson1234 commented 5 years ago

some time next year is my best guess :)