-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(integration): protobuf - additional annotations and features (#4493
- Loading branch information
Showing
44 changed files
with
1,081 additions
and
243 deletions.
There are no files selected for viewing
This file contains 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
Binary file added
BIN
+89.3 KB
metadata-integration/java/datahub-protobuf-example/libs/datahub-client.jar
Binary file not shown.
Binary file modified
BIN
+6.02 KB
(110%)
metadata-integration/java/datahub-protobuf-example/libs/datahub-protobuf.jar
Binary file not shown.
32 changes: 0 additions & 32 deletions
32
metadata-integration/java/datahub-protobuf-example/schema/protobuf/Person.proto
This file was deleted.
Oops, something went wrong.
This file contains 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
22 changes: 22 additions & 0 deletions
22
...integration/java/datahub-protobuf-example/schema/protobuf/v1/clickstream/ClickEvent.proto
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
syntax = "proto3"; | ||
package protobuf.clickstream; | ||
|
||
import "protobuf/meta/meta.proto"; | ||
import "google/protobuf/timestamp.proto"; | ||
|
||
|
||
/** | ||
Clickstream data | ||
**/ | ||
message Click { | ||
option(meta.message.type) = EVENT; | ||
|
||
option(meta.kafka.topics) = "clickstream_clicks"; | ||
|
||
option(meta.lifecycle.frequency) = REALTIME; | ||
option(meta.lifecycle.ttl) = "180d"; | ||
option(meta.lifecycle.archived) = true; | ||
|
||
google.protobuf.Timestamp timestamp = 1; // event timestamp | ||
map<string, uint32> map_field = 7; // https://developers.google.com/protocol-buffers/docs/proto3#maps | ||
} |
61 changes: 61 additions & 0 deletions
61
...ata-integration/java/datahub-protobuf-example/schema/protobuf/v1/clickstream/Device.proto
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
syntax = "proto3"; | ||
package protobuf.clickstream; | ||
|
||
import "protobuf/meta/meta.proto"; | ||
import "protobuf/v1/clickstream/ClickEvent.proto"; | ||
import "protobuf/v1/clickstream/SearchEvent.proto"; | ||
import "protobuf/v1/clickstream/ImpressionEvent.proto"; | ||
|
||
/** | ||
Represents an internet browser. | ||
Slack channel: #getting-started | ||
Git owner: @datahub-project/johndoe | ||
References: | ||
https://en.wikipedia.org/wiki/Web_browser | ||
**/ | ||
message Device { | ||
option(meta.ownership.domain) = "Marketing"; | ||
option(meta.ownership.team) = "Analytics"; | ||
option(meta.ownership.team) = "IT"; | ||
option(meta.ownership.data_steward) = "corpUser:John Doe"; | ||
|
||
option(meta.message.type) = ENTITY; | ||
|
||
option(meta.kafka.topics) = "devices"; | ||
|
||
// the device specific identifier | ||
string device_id = 1 [(meta.datahubField.is_primary_key) = true]; | ||
|
||
// the device type associated with this event | ||
DeviceType device_type = 2; | ||
|
||
// the user ids associated with this device | ||
repeated string user_id = 3; | ||
|
||
// device's user agent | ||
// https://en.wikipedia.org/wiki/User_agent | ||
string user_agent = 4; | ||
|
||
// device's ip address | ||
// https://en.wikipedia.org/wiki/IP_address | ||
string ip_address = 5 | ||
[(meta.securityField.classification) = "Classification.Sensitive"]; | ||
|
||
// Search history | ||
repeated Search searches = 100; | ||
|
||
// Impression history | ||
repeated Impression impressions = 101; | ||
|
||
// Click history | ||
repeated Click clicks = 102; | ||
} | ||
|
||
enum DeviceType { | ||
DESKTOP = 0; | ||
MOBILE = 1; | ||
TABLET = 2; | ||
} |
33 changes: 33 additions & 0 deletions
33
...ration/java/datahub-protobuf-example/schema/protobuf/v1/clickstream/ImpressionEvent.proto
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
syntax = "proto3"; | ||
package protobuf.clickstream; | ||
|
||
import "protobuf/meta/meta.proto"; | ||
import "google/protobuf/timestamp.proto"; | ||
|
||
/** | ||
Clickstream impressions | ||
**/ | ||
message Impression { | ||
option(meta.message.type) = EVENT; | ||
option(meta.kafka.topics) = "clickstream_impressions"; | ||
|
||
option(meta.props.prop1) = "prop1 value"; | ||
option(meta.props.prop2) = true; | ||
option(meta.props.prop3) = EVENT; | ||
|
||
option(meta.props.prop4) = "value1"; | ||
option(meta.props.prop4) = "value2"; | ||
option(meta.props.prop6) = EVENT; | ||
option(meta.props.prop6) = IMPRESSION; | ||
|
||
option(meta.tags.tag_str) = "value1"; | ||
option(meta.tags.tag_bool) = true; | ||
// option(meta.tags.tag_enum) = EVENT; | ||
option(meta.tags.tag_list) = "a, b, c"; | ||
|
||
option(meta.security.classification_enum) = HighlyConfidential; | ||
option(meta.security.classification) = "Classification.Sensitive"; | ||
|
||
google.protobuf.Timestamp timestamp = 1; // event timestamp | ||
string details = 2; // event details | ||
} |
24 changes: 24 additions & 0 deletions
24
...ntegration/java/datahub-protobuf-example/schema/protobuf/v1/clickstream/SearchEvent.proto
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
syntax = "proto3"; | ||
package protobuf.clickstream; | ||
|
||
import "protobuf/meta/meta.proto"; | ||
import "google/protobuf/timestamp.proto"; | ||
import "google/protobuf/wrappers.proto"; | ||
|
||
|
||
/** | ||
Search event | ||
**/ | ||
message Search { | ||
option(meta.message.type) = EVENT; | ||
|
||
option(meta.kafka.topics) = "clickstream_searches"; | ||
|
||
option(meta.lifecycle.frequency) = REALTIME; | ||
option(meta.lifecycle.ttl) = "180d"; | ||
option(meta.lifecycle.archived) = true; | ||
|
||
google.protobuf.Timestamp timestamp = 1; // event timestamp | ||
google.protobuf.StringValue search_term = 2; // search term | ||
google.protobuf.Int64Value results = 3; // results displayed | ||
} |
Oops, something went wrong.