databuild/databuild.proto

100 lines
2.3 KiB
Protocol Buffer

edition = "2023";
import "google/protobuf/timestamp.proto";
package databuild.v1;
// The type of dependency
enum DepType {
QUERY = 0; // Default
MATERIALIZE = 1;
}
// Represents a data dependency
message DataDep {
DepType dep_type = 1;
string partition_ref = 2;
}
// Configuration for a job
message JobConfig {
// The partitions that this parameterization produces
repeated string outputs = 1;
// Required data dependencies
repeated DataDep inputs = 2;
// Command line arguments
repeated string args = 3;
// Environment variables
map<string, string> env = 4;
}
// Represents a partition manifest
message PartitionManifest {
// The refs of the partitions produced by this job
repeated string outputs = 1;
// Input partition manifests
repeated PartitionManifest inputs = 2;
// Start time of job execution (Unix timestamp)
google.protobuf.Timestamp start_time = 3;
// End time of job execution (Unix timestamp)
google.protobuf.Timestamp end_time = 4;
// The configuration used to run the job
Task task = 5;
}
message Task {
// The bazel label uniquely identifying the job
string job_label = 1;
// The configuration for the job
JobConfig config = 2;
}
// Represents a job graph
message JobGraph {
// The output partitions to be produced by this graph
repeated string outputs = 1;
// The job configurations that make up this graph
repeated Task nodes = 2;
}
// Request message for job configuration service
message JobConfigRequest {
// The output references to configure jobs for
repeated string output_refs = 1;
}
// Response message for job configuration service
message JobConfigResponse {
// The job configurations
repeated JobConfig configs = 1;
}
// Request message for graph analyze service
message GraphAnalyzeRequest {
// The output references to analyze
repeated string output_refs = 1;
}
// Response message for graph analyze service
message GraphAnalyzeResponse {
// The job graph
JobGraph graph = 1;
}
// Service for job configuration and graph analysis
service DataBuildService {
// Get job configurations for the specified output references
rpc GetJobConfigs(JobConfigRequest) returns (JobConfigResponse) {}
// Analyze and get the job graph for the specified output references
rpc AnalyzeGraph(GraphAnalyzeRequest) returns (GraphAnalyzeResponse) {}
}