We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b83e740 + 10da997 commit 0101539Copy full SHA for 0101539
βscripts/create_bigtable.pyβ
@@ -18,6 +18,7 @@
18
import os
19
import sys
20
21
+from google.cloud.bigtable import column_family
22
import google.cloud.bigtable as bigtable
23
24
PROJECT_ID = os.getenv("GOOGLE_CLOUD_PROJECT")
@@ -57,8 +58,11 @@ def create_table(instance):
57
58
table_id,
59
instance,
60
)
61
+ max_versions_rule = column_family.MaxVersionsGCRule(1)
62
+ column_family_id = "body_mass_g"
63
+ column_families = {column_family_id: max_versions_rule}
64
if not table.exists():
- table.create()
65
+ table.create(column_families=column_families)
66
print(f"Created table {table_id}")
67
68
0 commit comments