mirror of
				https://github.com/datahub-project/datahub.git
				synced 2025-11-04 12:51:23 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			61 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Protocol Buffer
		
	
	
	
	
	
			
		
		
	
	
			61 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Protocol Buffer
		
	
	
	
	
	
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;
 | 
						|
} |