samples: add delete samples#1472
Conversation
billyjacobson
left a comment
There was a problem hiding this comment.
Thank you for these! Let me know if you have any questions
| public void deleteColumnFamily( | ||
| String projectId, String instanceId, String tableId, String rowKey, String familyName) { | ||
| try (BigtableDataClient dataClient = BigtableDataClient.create(projectId, instanceId)) { | ||
| dataClient.mutateRow(RowMutation.create(tableId, rowKey).deleteFamily(familyName)); |
There was a problem hiding this comment.
As I saw the delete table example, I rethought about this one. This is a bit unclear because you're not deleting the entire column family from the table right? You're just deleting the data in the family for the row?
Anyway, if needed might want a separate example doing deleting column families from the table if it is needed
There was a problem hiding this comment.
This is probably clarified by the documentation/reading the code – I think I might've been thrown off by it since I didn't know you can delete all the column family data for a row and defaulting to thinking about deleting CF for the table
| public void deleteColumnFamily( | ||
| String projectId, String instanceId, String tableId, String rowKey, String familyName) { | ||
| try (BigtableDataClient dataClient = BigtableDataClient.create(projectId, instanceId)) { | ||
| dataClient.mutateRow(RowMutation.create(tableId, rowKey).deleteFamily(familyName)); |
There was a problem hiding this comment.
This is probably clarified by the documentation/reading the code – I think I might've been thrown off by it since I didn't know you can delete all the column family data for a row and defaulting to thinking about deleting CF for the table
No description provided.