From 359e3768849cd39f6dbab4683f604b89d555f3a8 Mon Sep 17 00:00:00 2001 From: Elias Kassell Date: Tue, 14 Nov 2023 16:19:12 +0000 Subject: [PATCH] Add initial action config proto definitions (#1576) --- protos/core.proto | 84 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/protos/core.proto b/protos/core.proto index 949a38d8b..2ab8ed120 100644 --- a/protos/core.proto +++ b/protos/core.proto @@ -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. +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. +}