Add Java sample for creating custom entries in Data Catalog#2417
Closed
muhsinking wants to merge 1 commit intoGoogleCloudPlatform:masterfrom
Closed
Add Java sample for creating custom entries in Data Catalog#2417muhsinking wants to merge 1 commit intoGoogleCloudPlatform:masterfrom
muhsinking wants to merge 1 commit intoGoogleCloudPlatform:masterfrom
Conversation
lesv
suggested changes
Mar 16, 2020
Comment on lines
+58
to
+59
| // PermissionDeniedException or NotFoundException are thrown if | ||
| // Entry does not exist. |
Contributor
There was a problem hiding this comment.
Great that this is here -- Care to explain why one or the other?
Comment on lines
+45
to
+47
| // Initialize client that will be used to send requests. This client only needs to be created | ||
| // once, and can be reused for multiple requests. After completing all of your requests, call | ||
| // the "close" method on the client to safely clean up any remaining background resources. |
Comment on lines
+92
to
+94
| } catch (Exception e) { | ||
| System.out.printf("\nCannot delete template: %s", tagTemplateName); | ||
| } |
Contributor
There was a problem hiding this comment.
It would be good to be explicit.
Comment on lines
+121
to
+125
| .setUserSpecifiedSystem("onprem_data_system") | ||
| .setUserSpecifiedType("onprem_data_asset") | ||
| .setDisplayName("My awesome data asset") | ||
| .setDescription("This data asset is managed by an external system.") | ||
| .setLinkedResource("//my-onprem-server.com/dataAssets/my-awesome-data-asset") |
Contributor
There was a problem hiding this comment.
In general, we have a preference for samples to use UUID's, possibly in conjunction w/ text. We often have multiple tests running at the same time.
Comment on lines
+204
to
+207
| // AlreadyExistsException's are thrown if EntryGroup or Entry already exists. | ||
| // IOException's are thrown when unable to create the DataCatalogClient, | ||
| // for example an invalid Service Account path. | ||
| System.out.println("Error creating entry:\n" + e.toString()); |
Author
|
Backing off on this change and waiting for the sample author to add tests. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This will replace the inline sample at: https://cloud.google.com/data-catalog/docs/how-to/custom-entries#data-catalog-custom-entry-java