Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bigtable set_cell? #2517

Closed
dmitry-saritasa opened this issue Oct 8, 2016 · 3 comments
Closed

bigtable set_cell? #2517

dmitry-saritasa opened this issue Oct 8, 2016 · 3 comments
Assignees
Labels
api: bigtable Issues related to the Bigtable API. priority: p2 Moderately-important priority. Fix may not be included in next release.

Comments

@dmitry-saritasa
Copy link

dmitry-saritasa commented Oct 8, 2016

I'm little confused with the purpose of set_cell method. Here is what I see in official doc:
https://cloud.google.com/bigtable/docs/samples-python-hello

for i, value in enumerate(greetings):
        row_key = 'greeting{}'.format(i)
        row = table.row(row_key)
        row.set_cell(
            column_family_id,
            column_id,
            value.encode('utf-8'))
        row.commit()

My question is if I have multiple columns to write (under column family stat), like:
user, game, spot, asset then I need to perform multiple set_cell calls before making row.commit()?

Something like this

row_key = '{}'.format(guid)
row = table.row(row_key)
row.set_cell('stat', 'user', user)
row.set_cell('stat', 'game', game)
row.set_cell('stat', 'spot', spot)
row.set_cell('stat', 'asset', asset)
row.commit()

am I correct?

also do we have an ability to batch insert many rows or they should be done one by one sequentially?

@dhermes dhermes added the api: bigtable Issues related to the Bigtable API. label Oct 8, 2016
@daspecster
Copy link
Contributor

Hello @dmitry-saritasa! Thanks for the question!

  1. At first glance it appears you are correct.
  2. After looking through the documentation, it appears that there is no batching for adding rows at this time. Which kind of surprises me. WDYT @dhermes?

@tseaver
Copy link
Contributor

tseaver commented Oct 10, 2016

See #1546 / #2411 for multi-row discussion.

@lukesneeringer lukesneeringer added the priority: p2 Moderately-important priority. Fix may not be included in next release. label Apr 19, 2017
@lukesneeringer
Copy link
Contributor

Hello,
One of the challenges of maintaining a large open source project is that sometimes, you can bite off more than you can chew. As the lead maintainer of google-cloud-python, I can definitely say that I have let the issues here pile up.

As part of trying to get things under control (as well as to empower us to provide better customer service in the future), I am declaring a "bankruptcy" of sorts on many of the old issues, especially those likely to have been addressed or made obsolete by more recent updates.

My goal is to close stale issues whose relevance or solution is no longer immediately evident, and which appear to be of lower importance. I believe in good faith that this is one of those issues, but I am scanning quickly and may occasionally be wrong. If this is an issue of high importance, please comment here and we will reconsider. If this is an issue whose solution is trivial, please consider providing a pull request.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigtable Issues related to the Bigtable API. priority: p2 Moderately-important priority. Fix may not be included in next release.
Projects
None yet
Development

No branches or pull requests

5 participants