-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add
remote_function_options
to bigquery_routine (#9893)
* Add dataGovernanceType and remoteFunctionOptions to bigquery_routine * add function-sources.zip to biguquery fixtures * fix resource names in TestAccBigQueryRoutine * add bigquery routine remote function example
- Loading branch information
Showing
10 changed files
with
239 additions
and
6 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
27 changes: 27 additions & 0 deletions
27
mmv1/templates/terraform/examples/bigquery_routine_remote_function.tf.erb
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,27 @@ | ||
resource "google_bigquery_dataset" "test" { | ||
dataset_id = "<%= ctx[:vars]['dataset_id'] %>" | ||
} | ||
|
||
resource "google_bigquery_connection" "test" { | ||
connection_id = "<%= ctx[:vars]['connection_id'] %>" | ||
location = "US" | ||
cloud_resource { } | ||
} | ||
|
||
resource "google_bigquery_routine" "<%= ctx[:primary_resource_id] %>" { | ||
dataset_id = google_bigquery_dataset.test.dataset_id | ||
routine_id = "<%= ctx[:vars]['routine_id'] %>" | ||
routine_type = "SCALAR_FUNCTION" | ||
definition_body = "" | ||
|
||
return_type = "{\"typeKind\" : \"STRING\"}" | ||
|
||
remote_function_options { | ||
endpoint = "https://us-east1-my_gcf_project.cloudfunctions.net/remote_add" | ||
connection = google_bigquery_connection.test.name | ||
max_batching_rows = "10" | ||
user_defined_context = { | ||
"z": "1.5", | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
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
+458 Bytes
mmv1/third_party/terraform/services/bigquery/test-fixtures/function-source.zip
Binary file not shown.