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

BigQuery: Add Routines API. #8491

Merged
merged 7 commits into from
Jun 28, 2019
Merged

BigQuery: Add Routines API. #8491

merged 7 commits into from
Jun 28, 2019

Conversation

tswast
Copy link
Contributor

@tswast tswast commented Jun 27, 2019

Adds support for managing permanent functions in BigQuery, such
as scalar UDFs and stored procedures. At present, only
scalar UDF functionality is available.

Routines are registered as resources inside of datasets, and
allow expected CRUD operations. Currently, routines do not
support partial updates.

See: https://cloud.google.com/bigquery/docs/reference/rest/v2/routines

Adds support for managing permanent functions in BigQuery, such
as scalar UDFs and stored procedures.  At present, only
scalar UDF functionality is available.

Routines are registered as resources inside of datasets, and
allow expected CRUD operations.  Currently, routines do not
support partial updates.

See: https://cloud.google.com/bigquery/docs/reference/rest/v2/routines
@tswast tswast added the api: bigquery Issues related to the BigQuery API. label Jun 27, 2019
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 27, 2019
@tswast tswast marked this pull request as ready for review June 28, 2019 20:07
@tswast tswast requested review from a team and shollyman June 28, 2019 20:07
Copy link
Contributor

@shollyman shollyman left a comment

Choose a reason for hiding this comment

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

One thing I'm not seeing in here is the ddlTargetRoutine in querystats for query jobs. Other than that, it looks like good coverage and samples.

@@ -567,12 +632,54 @@ def update_model(self, model, fields, retry=DEFAULT_RETRY):
)
return Model.from_api_repr(api_response)

def update_routine(self, routine, fields, retry=DEFAULT_RETRY):
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we have something in the docstring about partial update support b/134928435?


@property
def imported_libraries(self):
"""List[str]: The path of the imported JavaScript libraries.
Copy link
Contributor

Choose a reason for hiding this comment

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

We should be clearer that this is a set of GCS paths e.g. gs://my-bucket/path/to/lib1.js, not js import/require statements.

@tswast tswast merged commit 226cdf1 into googleapis:master Jun 28, 2019
@tswast tswast deleted the bq-routines branch June 28, 2019 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the BigQuery API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants