HappyBase Table.cells不返回任何结果

时间:2019-05-15 06:43:59

标签: google-cloud-bigtable google-cloud-python

下面是我的代码

# Create a Cloud Bigtable client.
client = bigtable.Client(project=config.GCP_PROJECT_ID)

# Connect to an existing Cloud Bigtable instance.
instance = client.instance(config.BIGTABLE_INSTANCE_ID)

# Open an existing table.
connection = Connection(instance=instance)
table = Table(name=config.BIGTABLE_TABLE_ID, connection=connection)

row_data = table.cells(row=row_key, column=column_family_id, include_timestamp=True)
print("test")

“测试”从未打印。 table.cells不返回任何结果。有谁知道为什么吗?

1 个答案:

答案 0 :(得分:2)

https://cloud.google.com/bigtable/docs/samples-python-hello-happybase通过HappyBase API提供了一个示例,可能会有所帮助。

我建议检查您是否有set your Google Application Default Credentials,以及是否能够成功获取实例和表。