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

Allow tables with several column families in Bigtable #1069

Merged
merged 7 commits into from
Dec 22, 2022

Conversation

iht
Copy link
Member

@iht iht commented Dec 22, 2022

A table in Bigtable can have more than one column family (or none), and split_keys is optional for google_bigtable_table resources.

This PR fixes #1064. It lets the user specify 0 or more column families for each table, and makes split_keys an optional parameter for each declared table.

Because column families are schema properties of a Bigtable table and split_keys are related to the actual values stored in a table, I don't think it makes sense to speak of default settings for those properties, and I have removed that option from this module. Now users should specify (or not) column_families and split_keys for each one of the declared tables.

The default value for a table with no additional options was null. I have changed that to an empty map {} so the default values of the corresponding optional parameters are used.

This commit fixes GoogleCloudPlatform#1064 by allowing to add more than one column family. Split
keys are also now optional, and there is no possibility to set defaults for all
tables (since keys and column families are related to the data and schema for
each table, it is difficult that several tables share the same values).

Also, declaring a table with no split keys nor column families requires
initializing the table to an empty map, instead of using null.
Copy link
Collaborator

@ludoo ludoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice change, once the single comment is addressed this can be merged, thanks Israel!

@iht iht enabled auto-merge December 22, 2022 15:35
@iht iht merged commit 0d3a4a9 into GoogleCloudPlatform:master Dec 22, 2022
@iht iht deleted the fix_column_families branch December 22, 2022 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bigtable module only allows a single column family
2 participants