Default Warehouse Override
Represents a per-user default warehouse override configuration. This resource allows users or administrators to customize how a user's default warehouse is selected for SQL operations. If no override exists for a user, the workspace default warehouse will be used.
DefaultWarehouseOverride object
Represents a per-user default warehouse override configuration. This resource allows users or administrators to customize how a user's default warehouse is selected for SQL operations. If no override exists for a user, the workspace default warehouse will be used.
- namestringBetaIDImmutable
The resource name of the default warehouse override. Format: default-warehouse-overrides/{default_warehouse_override_id} Responses always contain the numeric user ID, even when the request used
me.
- default_warehouse_override_idstringBetaOutput only
The numeric ID of the user that the override applies to. It is the last component of
name.
- typestringBeta
The type of override behavior.
LAST_SELECTEDCUSTOM
- warehouse_idstringBeta
The ID of the SQL warehouse to preselect when
typeisCUSTOM. It is required forCUSTOMand must be a valid warehouse ID. It is ignored forLAST_SELECTEDand is not returned for that type.
Get default warehouse override Beta
GET
Returns the default warehouse override for a user.
Users can fetch their own override. Admins can fetch overrides for any user.
If the user has no override, the request fails with NOT_FOUND and the workspace default
warehouse is used.
API scopes: sql
Parameters
- namestringRequiredpath
Required. The resource name of the default warehouse override to retrieve. Format: default-warehouse-overrides/{default_warehouse_override_id} The default_warehouse_override_id can be a numeric user ID or the literal string "me" for the current user.
Response
Returns the DefaultWarehouseOverride object.
List default warehouse overrides Beta
GET
Lists all default warehouse overrides in the workspace. Only workspace administrators can list all overrides.
API scopes: sql
Parameters
- page_sizeint32query
The maximum number of overrides to return. The service may return fewer than this value. If unspecified, at most 100 overrides will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
- page_tokenstringquery
A page token, received from a previous
ListDefaultWarehouseOverridescall. Provide this to retrieve the subsequent page.When paginating, all other parameters provided to
ListDefaultWarehouseOverridesmust match the call that provided the page token.
Response
Returns a list of DefaultWarehouseOverride objects.
Create default warehouse override Beta
POST
Creates a new default warehouse override for a user.
Users can create their own override. Admins can create overrides for any user.
If the user already has an override, the request fails with ALREADY_EXISTS.
API scopes: sql
Parameters
- default_warehouse_override_idstringRequiredquery
Required. The ID to use for the override, which will become the final component of the override's resource name. Can be a numeric user ID or the literal string "me" for the current user.
Request body
Required. The default warehouse override to create.
- namestringIDImmutable
The resource name of the default warehouse override. Format: default-warehouse-overrides/{default_warehouse_override_id} Responses always contain the numeric user ID, even when the request used
me.
- typestringRequired
The type of override behavior.
LAST_SELECTEDCUSTOM
- warehouse_idstring
The ID of the SQL warehouse to preselect when
typeisCUSTOM. It is required forCUSTOMand must be a valid warehouse ID. It is ignored forLAST_SELECTEDand is not returned for that type.
Response
Returns the DefaultWarehouseOverride object.
Update default warehouse override Beta
PATCH
Updates an existing default warehouse override for a user.
Users can update their own override. Admins can update overrides for any user.
If the user has no override, the request fails with NOT_FOUND unless allow_missing is true.
API scopes: sql
Parameters
- namestringRequiredIDImmutablepath
The resource name of the default warehouse override. Format: default-warehouse-overrides/{default_warehouse_override_id} Responses always contain the numeric user ID, even when the request used
me.
- update_maskstringRequiredquery
Required. Field mask specifying which fields to update. Only the fields specified in the mask will be updated. Use "*" to update all fields. When allow_missing is true, this field is ignored and all fields are applied.
- allow_missingbooleanquery
If set to true, and the override is not found, a new override will be created. Whenever
allow_missingis true,update_maskis ignored and all fields are applied, whether or not the override already exists. Defaults to false.
Request body
Required. The default warehouse override to update. The name field must be set in the format: default-warehouse-overrides/{default_warehouse_override_id} The default_warehouse_override_id can be a numeric user ID or the literal string "me" for the current user.
- typestringRequired
The type of override behavior.
LAST_SELECTEDCUSTOM
- warehouse_idstring
The ID of the SQL warehouse to preselect when
typeisCUSTOM. It is required forCUSTOMand must be a valid warehouse ID. It is ignored forLAST_SELECTEDand is not returned for that type.
Response
Returns the DefaultWarehouseOverride object.
Delete default warehouse override Beta
DELETE
Deletes the default warehouse override for a user. Users can delete their own override. Admins can delete overrides for any user. After deletion, the workspace default warehouse will be used.
API scopes: sql
Parameters
- namestringRequiredpath
Required. The resource name of the default warehouse override to delete. Format: default-warehouse-overrides/{default_warehouse_override_id} The default_warehouse_override_id can be a numeric user ID or the literal string "me" for the current user.