-
Notifications
You must be signed in to change notification settings - Fork 86
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
samples: add delete samples #1472
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for these! Let me know if you have any questions
samples/snippets/src/main/java/com/example/bigtable/deletes/DeleteCheckAndMutateExample.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/main/java/com/example/bigtable/deletes/DeleteCheckAndMutateExample.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/main/java/com/example/bigtable/deletes/DeleteCheckAndMutateExample.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/main/java/com/example/bigtable/deletes/DeleteDropRowRangeExample.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/main/java/com/example/bigtable/deletes/DeleteFromColumnExample.java
Outdated
Show resolved
Hide resolved
...s/snippets/src/main/java/com/example/bigtable/deletes/DeleteStreamingAndBatchingExample.java
Outdated
Show resolved
Hide resolved
...s/snippets/src/main/java/com/example/bigtable/deletes/DeleteStreamingAndBatchingExample.java
Outdated
Show resolved
Hide resolved
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
samples/snippets/src/test/java/com/example/bigtable/deletes/DeletesTest.java
Show resolved
Hide resolved
samples/snippets/src/test/java/com/example/bigtable/deletes/DeletesTest.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/main/java/com/example/bigtable/deletes/BatchDeleteExample.java
Show resolved
Hide resolved
samples/snippets/src/main/java/com/example/bigtable/deletes/DeleteDropRowRangeExample.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/test/java/com/example/bigtable/deletes/DeletesTest.java
Outdated
Show resolved
Hide resolved
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.