Skip to content
This repository was archived by the owner on May 8, 2026. It is now read-only.

samples: add delete samples#1472

Merged
gcf-merge-on-green[bot] merged 10 commits into
googleapis:mainfrom
kolea2:deletes-samples
Apr 11, 2023
Merged

samples: add delete samples#1472
gcf-merge-on-green[bot] merged 10 commits into
googleapis:mainfrom
kolea2:deletes-samples

Conversation

@kolea2
Copy link
Copy Markdown
Contributor

@kolea2 kolea2 commented Oct 21, 2022

No description provided.

@product-auto-label product-auto-label Bot added the size: l Pull request size is large. label Oct 21, 2022
@snippet-bot
Copy link
Copy Markdown

snippet-bot Bot commented Oct 21, 2022

Here is the summary of changes.

You are about to add 7 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@product-auto-label product-auto-label Bot added api: bigtable Issues related to the googleapis/java-bigtable API. samples Issues that are directly related to samples. labels Oct 21, 2022
Copy link
Copy Markdown
Contributor

@billyjacobson billyjacobson left a 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

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));
Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor

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

Comment thread samples/snippets/src/test/java/com/example/bigtable/deletes/DeletesTest.java Outdated
Comment thread samples/snippets/src/test/java/com/example/bigtable/deletes/DeletesTest.java Outdated
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));
Copy link
Copy Markdown
Contributor

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

@kolea2 kolea2 added the owlbot:run Add this label to trigger the Owlbot post processor. label Apr 11, 2023
@gcf-owl-bot gcf-owl-bot Bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Apr 11, 2023
@gcf-owl-bot gcf-owl-bot Bot requested review from a team April 11, 2023 14:42
@kolea2 kolea2 added the automerge Merge the pull request once unit tests and other checks pass. label Apr 11, 2023
@gcf-merge-on-green gcf-merge-on-green Bot merged commit d9afa06 into googleapis:main Apr 11, 2023
@gcf-merge-on-green gcf-merge-on-green Bot removed the automerge Merge the pull request once unit tests and other checks pass. label Apr 11, 2023
@kolea2 kolea2 deleted the deletes-samples branch April 11, 2023 15:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: bigtable Issues related to the googleapis/java-bigtable API. samples Issues that are directly related to samples. size: l Pull request size is large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants