docs(samples): adds samples from documentation with correct region tags #370
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.
Added a few comments that should be applied across samples. Will you add tests to this PR?
samples/snippets/src/main/java/com/example/datacatalog/CreateCustomEntry.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/main/java/com/example/datacatalog/CreateCustomEntry.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/main/java/com/example/datacatalog/CreateCustomEntry.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/main/java/com/example/datacatalog/CreateCustomEntry.java
Outdated
Show resolved
Hide resolved
.createTagTemplate(createTagTemplateRequest); | ||
System.out.printf("\nTemplate created with name: %s", createdTagTemplate.getName()); | ||
|
||
TagField sourceValue = |
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.
Should there be another comment for using the tag template to create a tag?
samples/snippets/src/main/java/com/example/datacatalog/GrantTagTemplateUserRole.java
Outdated
Show resolved
Hide resolved
.setType(FieldType.newBuilder().setPrimitiveType(PrimitiveType.BOOL).build()) | ||
.build(); | ||
|
||
TagTemplateField piiTypeField = |
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 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(); |
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.
Where does this value come from?
createTags(projectId, tagTemplateId); | ||
} | ||
|
||
public static void createTags(String projectId, String tagTemplateId) { |
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.
nit: Listing the params here too would be nice.
Ref PR #392 |
…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>
Samples are added in #392. Hence, closing this duplicate PR. |
Adds samples from DevSite documentation. Region tags included in added/updates files are correct.
The following additions are needed before merging:
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.
Fixes #369 ☕️