Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

docs(samples): adds samples from documentation with correct region tags #370

Closed
wants to merge 6 commits into from

Conversation

steffnay
Copy link
Contributor

Adds samples from DevSite documentation. Region tags included in added/updates files are correct.

The following additions are needed before merging:

  • Samples updated to sample rubric standards
  • File names changed to match region tags
  • Tests added

Requested changes are limited to samples in the scope of this PR.
Ideally, another PR will update content and metadata of the other existing samples.

  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #369 ☕️

@steffnay steffnay requested a review from a team November 29, 2020 15:30
@snippet-bot
Copy link

snippet-bot bot commented Nov 29, 2020

Here is the summary of changes.

You are about to add 5 region tags.
You are about to delete 1 region tag.

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 the api: datacatalog Issues related to the googleapis/java-datacatalog API. label Nov 29, 2020
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Nov 29, 2020
@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Nov 29, 2020
@steffnay steffnay changed the title docs(samples): adds samples from documentation with correct region tags DO NOT MERGE docs(samples): adds samples from documentation with correct region tags Nov 29, 2020
Copy link

@averikitsch averikitsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a few comments that should be applied across samples. Will you add tests to this PR?

.createTagTemplate(createTagTemplateRequest);
System.out.printf("\nTemplate created with name: %s", createdTagTemplate.getName());

TagField sourceValue =

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be another comment for using the tag template to create a tag?

.setType(FieldType.newBuilder().setPrimitiveType(PrimitiveType.BOOL).build())
.build();

TagTemplateField piiTypeField =

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is hard to read. Can some of the builders be created outside the parent builder?

// -------------------------------
TagField sourceValue =
TagField.newBuilder().setStringValue("Copied from tlc_yellow_trips_2017").build();
TagField numRowsValue = TagField.newBuilder().setDoubleValue(113496874).build();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does this value come from?

createTags(projectId, tagTemplateId);
}

public static void createTags(String projectId, String tagTemplateId) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Listing the params here too would be nice.

@meredithslota meredithslota added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Dec 9, 2020
@steffnay steffnay marked this pull request as draft December 11, 2020 15:43
@steffnay steffnay changed the title DO NOT MERGE docs(samples): adds samples from documentation with correct region tags docs(samples): adds samples from documentation with correct region tags Dec 11, 2020
@pmakani
Copy link
Contributor

pmakani commented Dec 17, 2020

Ref PR #392

@averikitsch averikitsch removed their assignment Jan 5, 2021
stephaniewang526 and others added 5 commits June 30, 2021 15:14
…ustomEntry.java

Co-authored-by: Averi Kitsch <akitsch@google.com>
…ustomEntry.java

Co-authored-by: Averi Kitsch <akitsch@google.com>
…gTemplateUserRole.java

Co-authored-by: Averi Kitsch <akitsch@google.com>
@stephaniewang526
Copy link
Contributor

Samples are added in #392. Hence, closing this duplicate PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: datacatalog Issues related to the googleapis/java-datacatalog API. cla: yes This human has signed the Contributor License Agreement. do not merge Indicates a pull request not ready for merge, due to either quality or timing. samples Issues that are directly related to samples.
Projects
None yet
6 participants