Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial action config proto definitions #1576

Merged
merged 1 commit into from
Nov 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions protos/core.proto
Original file line number Diff line number Diff line change
Expand Up @@ -291,3 +291,87 @@ message CompileExecutionRequest {
message CompileExecutionResponse {
CompiledGraph compiled_graph = 1;
}

message ActionConfigs {
repeated ActionConfig actions = 1;
}

message ActionConfig {
// Target is a unique action identifier.
Target target = 1;

// A list of user-defined tags with which the action should be labeled.
repeated string tags = 2;

// Targets of actions that this action is dependent on.
repeated Target dependency_targets = 3;

// Type specific configs. Must correspond to the declared type.
oneof action_config {
TableConfig table = 4;
ViewConfig view = 5;
IncrementalTableConfig incremental_table = 6;
AssertionConfig assertion = 7;
OperationConfig operation = 8;
DeclarationConfig declaration = 9;
NotebookConfig notebook = 10;
}
}

// Configuration options for BigQuery tables.
message TableConfig {
// If set to true, this action will not be executed. However, the action may
// still be depended upon.
bool disabled = 1;
}

// Configuration options for BigQuery views.
message ViewConfig {
// If set to true, this action will not be executed. However, the action may
// still be depended upon.
bool disabled = 1;

// If set to true, will make the view materialized.
// For more information, read the [BigQuery materialized view
// docs](https://cloud.google.com/bigquery/docs/materialized-views-intro).
bool materialized = 2;
}

// Configuration options for BigQuery incremental tables.
message IncrementalTableConfig {
// If set to true, this action will not be executed. However, the action may
// still be depended upon.
bool disabled = 1;
}

// Configuration options for BigQuery table assertions.
message AssertionConfig {
// If set to true, this action will not be executed. However, the action may
// still be depended upon.
bool disabled = 1;
}

// Configuration options for BigQuery table opertions.
message OperationConfig {
// If set to true, this action will not be executed. However, the action may
// still be depended upon.
bool disabled = 1;

// Declares that this `operations` action creates a dataset which should be
// referenceable using the `ref` function.
bool has_output = 2;
}

// Configuration options for BigQuery table declarations.
// TODO(ekrekr): remove this empty message, if explicit action type without a
// `type` field proves to be impossible / ugly.
Comment on lines +366 to +367
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fwiw: i am much more comfortable keeping this message around now that we no longer have a type field - it has semantic purpose now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice - I want to make sure that all use cases do end up being OK without type while I play around with this a bit, which is why I've left this comment.

message DeclarationConfig {}

// Configuration options for Vertex AI notebooks.
message NotebookConfig {
// If set to true, this action will not be executed. However, the action may
// still be depended upon.
bool disabled = 1;

// TODO(ekrekr): add a notebook runtime field definition.
}
Loading