Skip to content

Commit 42a342c

Browse files
committed
updated family setup
1 parent dfc070c commit 42a342c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

samples/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
from google.cloud import bigtable
1919
from google.cloud.bigtable.column_family import ColumnFamily
20+
from google.cloud.bigtable_admin_v2.types import ColumnFamily as ColumnFamily_pb
2021
from google.api_core import exceptions
2122
from google.api_core.retry import Retry
2223
from google.api_core.retry import if_exception_type
@@ -62,7 +63,7 @@ def create_table(project, instance_id, table_id, column_families={}):
6263

6364
# convert column families to pb if needed
6465
pb_families = {
65-
id: ColumnFamily(id, table, rule).to_pb() if not isinstance(rule, ColumnFamily) else rule
66+
id: ColumnFamily(id, table, rule).to_pb() if not isinstance(rule, ColumnFamily_pb) else rule
6667
for (id, rule) in column_families.items()
6768
}
6869

0 commit comments

Comments
 (0)