diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 5fedbcf..149ca15 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -25,6 +25,7 @@ docs/Cluster.md docs/Collection.md docs/CollectionMount.md docs/CollectionMountResponse.md +docs/CollectionMountStats.md docs/CollectionStats.md docs/CollectionsApi.md docs/CreateAliasRequest.md @@ -32,6 +33,7 @@ docs/CreateAliasResponse.md docs/CreateApiKeyRequest.md docs/CreateApiKeyResponse.md docs/CreateCollectionMountRequest.md +docs/CreateCollectionMountsResponse.md docs/CreateCollectionRequest.md docs/CreateCollectionResponse.md docs/CreateIntegrationRequest.md @@ -69,6 +71,7 @@ docs/DynamodbIntegrationCreationRequest.md docs/DynamodbSourceWrapper.md docs/ErrorModel.md docs/EventTimeInfo.md +docs/ExecutePublicQueryLambdaRequest.md docs/ExecuteQueryLambdaRequest.md docs/FieldMappingQuery.md docs/FieldMappingV2.md @@ -257,12 +260,14 @@ rockset/model/cluster.py rockset/model/collection.py rockset/model/collection_mount.py rockset/model/collection_mount_response.py +rockset/model/collection_mount_stats.py rockset/model/collection_stats.py rockset/model/create_alias_request.py rockset/model/create_alias_response.py rockset/model/create_api_key_request.py rockset/model/create_api_key_response.py rockset/model/create_collection_mount_request.py +rockset/model/create_collection_mounts_response.py rockset/model/create_collection_request.py rockset/model/create_collection_response.py rockset/model/create_integration_request.py @@ -298,6 +303,7 @@ rockset/model/dynamodb_integration_creation_request.py rockset/model/dynamodb_source_wrapper.py rockset/model/error_model.py rockset/model/event_time_info.py +rockset/model/execute_public_query_lambda_request.py rockset/model/execute_query_lambda_request.py rockset/model/field_mapping_query.py rockset/model/field_mapping_v2.py @@ -461,6 +467,7 @@ test/test_cluster.py test/test_collection.py test/test_collection_mount.py test/test_collection_mount_response.py +test/test_collection_mount_stats.py test/test_collection_stats.py test/test_collections_api.py test/test_create_alias_request.py @@ -468,6 +475,7 @@ test/test_create_alias_response.py test/test_create_api_key_request.py test/test_create_api_key_response.py test/test_create_collection_mount_request.py +test/test_create_collection_mounts_response.py test/test_create_collection_request.py test/test_create_collection_response.py test/test_create_integration_request.py @@ -505,6 +513,7 @@ test/test_dynamodb_integration_creation_request.py test/test_dynamodb_source_wrapper.py test/test_error_model.py test/test_event_time_info.py +test/test_execute_public_query_lambda_request.py test/test_execute_query_lambda_request.py test/test_field_mapping_query.py test/test_field_mapping_v2.py diff --git a/HISTORY.md b/HISTORY.md index 219a904..abb3842 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,7 @@ +### v1.0.5 + - New api changes + - Issue with mount response fixed (was actually an issue with the API) https://github.com/rockset/rockset-python-client/issues/2 + ### v1.0.4 - Enum added for usw2a1 diff --git a/docs/BulkStats.md b/docs/BulkStats.md index cac67da..9bcc69e 100644 --- a/docs/BulkStats.md +++ b/docs/BulkStats.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data_downloaded_bytes** | **int** | Size in bytes of documents downloaded from source during an ongoing or completed bulk ingest. This includes documents that are dropped and reingested. | [optional] **data_indexed_bytes** | **int** | Size in bytes of documents indexed. This is the total size of documents after transformations and dropping before indexes are built. | [optional] +**data_indexed_throughput_bytes** | **float** | Throughput of documents indexed in the last minute measured in bytes/s. This is based off the data_indexed_bytes size. Throughput during the download stage is shown on a per-source granularity in the sources field of the Collection response. | [optional] **documents_downloaded** | **int** | Number of documents downloaded from source during an ongoing or completed bulk ingest. This includes documents that are dropped and reingested. | [optional] **download_compute_ms** | **int** | Bulk ingest compute units in milliseconds used for downloading documents. | [optional] **downloading_stage_done_at** | **str** | ISO-8601 date of when the downloading stage was completed. | [optional] @@ -13,9 +14,11 @@ Name | Type | Description | Notes **index_compute_ms** | **int** | Bulk ingest compute units in milliseconds used for indexing documents. | [optional] **indexing_stage_done_at** | **str** | ISO-8601 date of when the indexing stage was completed. | [optional] **initializing_stage_done_at** | **str** | ISO-8601 date of when the initializing stage was completed. | [optional] +**pre_index_size_bytes** | **int** | Size in bytes of documents before being indexed. This is the total size of documents after decompression, transformations, and dropping. This is equal to data_indexed_bytes after the indexing stage is done unless there are retries during indexing the data. | [optional] **provisioning_stage_done_at** | **str** | ISO-8601 date of when the provisioning stage was completed. | [optional] **started_at** | **str** | ISO-8601 date of when the bulk ingest was started. | [optional] **total_index_size_bytes** | **int** | Total size of indexes after the completed bulk ingest. This is the same as collection size. | [optional] +**transformation_compute_ms** | **int** | Bulk ingest compute units in milliseconds used for ingest transformation. | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CollectionMount.md b/docs/CollectionMount.md index 11e0a5b..87bc416 100644 --- a/docs/CollectionMount.md +++ b/docs/CollectionMount.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **rrn** | **str** | Mount RRN. | [optional] **snapshot_expiration_time_millis** | **int** | Time in millis at which the snapshot expires. | [optional] **state** | **str** | Mount type. | [optional] +**stats** | [**CollectionMountStats**](CollectionMountStats.md) | | [optional] **type** | **str** | Mount type. | [optional] **virtual_instance_id** | **str** | Virtual instance ID. | [optional] **virtual_instance_rrn** | **str** | Virtual Instance RRN. | [optional] diff --git a/docs/CollectionMountStats.md b/docs/CollectionMountStats.md new file mode 100644 index 0000000..2c8e5a3 --- /dev/null +++ b/docs/CollectionMountStats.md @@ -0,0 +1,12 @@ +# CollectionMountStats + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**last_queried_ms** | **int** | Milliseconds since Unix epoch Jan 1, 1970. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateCollectionMountsResponse.md b/docs/CreateCollectionMountsResponse.md new file mode 100644 index 0000000..4c7b882 --- /dev/null +++ b/docs/CreateCollectionMountsResponse.md @@ -0,0 +1,12 @@ +# CreateCollectionMountsResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**[CollectionMount]**](CollectionMount.md) | Mounts created. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateUserRequest.md b/docs/CreateUserRequest.md index bba05a7..462a96d 100644 --- a/docs/CreateUserRequest.md +++ b/docs/CreateUserRequest.md @@ -6,6 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **email** | **str** | User email, must be unique. | **roles** | **[str]** | List of roles for a given user. | +**first_name** | **str** | User first name. | [optional] +**last_name** | **str** | User last name. | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ExecutePublicQueryLambdaRequest.md b/docs/ExecutePublicQueryLambdaRequest.md new file mode 100644 index 0000000..406d40d --- /dev/null +++ b/docs/ExecutePublicQueryLambdaRequest.md @@ -0,0 +1,14 @@ +# ExecutePublicQueryLambdaRequest + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**default_row_limit** | **int** | Row limit to use if no limit specified in the SQL query text. | [optional] +**generate_warnings** | **bool** | Whether to generate warnings. | [optional] +**parameters** | [**[QueryParameter]**](QueryParameter.md) | List of named parameters. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/QueriesApi.md b/docs/QueriesApi.md index 3ab0420..cd0758a 100644 --- a/docs/QueriesApi.md +++ b/docs/QueriesApi.md @@ -235,6 +235,7 @@ Name | Type | Description | Notes **query_id** | **str** | | **cursor** | **str** | Cursor to current page. If unset, will default to the first page. | [optional] **docs** | **int** | Number of documents to fetch. | [optional] + **offset** | **int** | Offset from the cursor of the first document to be returned | [optional] ### Return type @@ -377,7 +378,7 @@ rs = RocksetClient(api_key="abc123", host=Regions.use1a1) api_response = rs.Queries.query( sql=QueryRequestSql( default_row_limit=1, - generate_warnings=True, + generate_warnings=False, initial_paginate_response_doc_count=1, paginate=True, parameters=[ @@ -406,7 +407,7 @@ api_response = await rs.Queries.query( ), sql=QueryRequestSql( default_row_limit=1, - generate_warnings=True, + generate_warnings=False, initial_paginate_response_doc_count=1, paginate=True, parameters=[ @@ -495,7 +496,7 @@ rs = RocksetClient(api_key="abc123", host=Regions.use1a1) api_response = rs.Queries.validate( sql=QueryRequestSql( default_row_limit=1, - generate_warnings=True, + generate_warnings=False, initial_paginate_response_doc_count=1, paginate=True, parameters=[ @@ -524,7 +525,7 @@ api_response = await rs.Queries.validate( ), sql=QueryRequestSql( default_row_limit=1, - generate_warnings=True, + generate_warnings=False, initial_paginate_response_doc_count=1, paginate=True, parameters=[ diff --git a/docs/QueryRequestSql.md b/docs/QueryRequestSql.md index e45f8dd..4a45195 100644 --- a/docs/QueryRequestSql.md +++ b/docs/QueryRequestSql.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **default_row_limit** | **int** | Row limit to use. Limits specified in the query text will override this default. | [optional] **generate_warnings** | **bool** | Flag to enable warnings. Warnings can help debug query issues but negatively affect performance. | [optional] **initial_paginate_response_doc_count** | **int** | Number of documents to return in addition to paginating for this query call. Only relevant if `paginate` flag is also set. | [optional] -**paginate** | **bool** | Flag to paginate and store the results of this query for later / sequential retrieval. | [optional] +**paginate** | **bool** | Flag to paginate and store the results of this query for later sequential retrieval. | [optional] **parameters** | [**[QueryParameter]**](QueryParameter.md) | List of named parameters. | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] diff --git a/docs/SharedLambdasApi.md b/docs/SharedLambdasApi.md index 1dbc925..82784b0 100644 --- a/docs/SharedLambdasApi.md +++ b/docs/SharedLambdasApi.md @@ -4,15 +4,15 @@ All URIs are relative to *https://api.use1a1.rockset.com* or the apiserver provi Method | HTTP request | Description ------------- | ------------- | ------------- -[**execute_public_query_lambda**](SharedLambdasApi.md#execute_public_query_lambda) | **GET** /v1/public/shared_lambdas/{public_access_id} | Execute a Public Query Lambda +[**execute_public_query_lambda_with_params**](SharedLambdasApi.md#execute_public_query_lambda_with_params) | **POST** /v1/public/shared_lambdas/{public_access_id} | Execute a Public Query Lambda -# **execute_public_query_lambda** -> QueryResponse execute_public_query_lambda(public_access_id) +# **execute_public_query_lambda_with_params** +> QueryResponse execute_public_query_lambda_with_params(public_access_id) Execute a Public Query Lambda -Execute a public query lambda. +Execute a public query lambda (full version). ### Example @@ -28,23 +28,23 @@ rs = RocksetClient(api_key="abc123", host=Regions.use1a1) # synchronous example passing only required values which don't have defaults set # Execute a Public Query Lambda -api_response = rs.SharedLambdas.execute_public_query_lambda( +api_response = rs.SharedLambdas.execute_public_query_lambda_with_params( public_access_id="public_access_id_example", ) pprint(api_response) # Error responses from the server will cause the client to throw an ApiException # except ApiException as e: -# print("Exception when calling SharedLambdas->execute_public_query_lambda: %s\n" % e) +# print("Exception when calling SharedLambdas->execute_public_query_lambda_with_params: %s\n" % e) # asynchronous example passing optional values and required values which don't have defaults set # assumes that execution takes place within an asynchronous context # Execute a Public Query Lambda -api_response = await rs.SharedLambdas.execute_public_query_lambda( +api_response = await rs.SharedLambdas.execute_public_query_lambda_with_params( public_access_id="public_access_id_example", async_req=True, ) if isinstance(api_response, rockset.ApiException): - print("Exception when calling SharedLambdas->execute_public_query_lambda: %s\n" % e) + print("Exception when calling SharedLambdas->execute_public_query_lambda_with_params: %s\n" % e) return pprint(api_response) @@ -56,6 +56,10 @@ pprint(api_response) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **public_access_id** | **str** | public access ID of the query lambda | + **default_row_limit** | **int** | Row limit to use if no limit specified in the SQL query text. | [optional] + **generate_warnings** | **bool** | Whether to generate warnings. | [optional] + **parameters** | [**[QueryParameter]**](QueryParameter.md) | List of named parameters. | [optional] + ### Return type @@ -68,7 +72,7 @@ All requests must use apikeys for [authorization](../README.md#Documentation-For ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json diff --git a/docs/Status.md b/docs/Status.md index f5c269e..2e93f40 100644 --- a/docs/Status.md +++ b/docs/Status.md @@ -4,6 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**detected_size_bytes** | **int** | Size in bytes detected for the source at collection initialization. This size can be 0 or null for event stream sources. | [optional] **last_processed_at** | **str** | ISO-8601 date when source was last processed. | [optional] **last_processed_item** | **str** | Last source item processed by ingester. | [optional] **message** | **str** | State message. | [optional] diff --git a/docs/UsersApi.md b/docs/UsersApi.md index 7ccb633..9b2f966 100644 --- a/docs/UsersApi.md +++ b/docs/UsersApi.md @@ -49,6 +49,8 @@ pprint(api_response) # Create User api_response = await rs.Users.create( email="hello@rockset.com", + first_name="John", + last_name="Doe", roles=["admin","member","read-only"], async_req=True, ) @@ -65,6 +67,8 @@ pprint(api_response) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **email** | **str** | User email, must be unique. | + **first_name** | **str** | User first name. | [optional] + **last_name** | **str** | User last name. | [optional] **roles** | **[str]** | List of roles for a given user. | [optional] ### Return type diff --git a/docs/VirtualInstancesApi.md b/docs/VirtualInstancesApi.md index fbbe3c1..2dbfd1e 100644 --- a/docs/VirtualInstancesApi.md +++ b/docs/VirtualInstancesApi.md @@ -626,7 +626,7 @@ All requests must use apikeys for [authorization](../README.md#Documentation-For [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **mount_collection** -> CollectionMountResponse mount_collection(virtual_instance_id, create_collection_mount_request) +> CreateCollectionMountsResponse mount_collection(virtual_instance_id, create_collection_mount_request) Mount Collection @@ -681,7 +681,7 @@ Name | Type | Description | Notes ### Return type -[**CollectionMountResponse**](CollectionMountResponse.md) +[**CreateCollectionMountsResponse**](CreateCollectionMountsResponse.md) ### Authorization @@ -740,7 +740,7 @@ api_response = rs.VirtualInstances.query_virtual_instance( virtual_instance_id="virtualInstanceId_example", sql=QueryRequestSql( default_row_limit=1, - generate_warnings=True, + generate_warnings=False, initial_paginate_response_doc_count=1, paginate=True, parameters=[ @@ -770,7 +770,7 @@ api_response = await rs.VirtualInstances.query_virtual_instance( ), sql=QueryRequestSql( default_row_limit=1, - generate_warnings=True, + generate_warnings=False, initial_paginate_response_doc_count=1, paginate=True, parameters=[ diff --git a/pyproject.toml b/pyproject.toml index f88da1a..195fa78 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "rockset" -version = "1.0.4" +version = "1.0.5" description = "The python client for the Rockset API." authors = ["Rockset "] packages = [ diff --git a/rockset/api/queries_api.py b/rockset/api/queries_api.py index 8c31ed4..f10225a 100644 --- a/rockset/api/queries_api.py +++ b/rockset/api/queries_api.py @@ -164,6 +164,7 @@ def __init__(self, api_client=None): 'query_id', 'cursor', 'docs', + 'offset', ], 'required': [ 'query_id', @@ -187,16 +188,20 @@ def __init__(self, api_client=None): (str,), 'docs': (int,), + 'offset': + (int,), }, 'attribute_map': { 'query_id': 'queryId', 'cursor': 'cursor', 'docs': 'docs', + 'offset': 'offset', }, 'location_map': { 'query_id': 'path', 'cursor': 'query', 'docs': 'query', + 'offset': 'query', }, 'collection_format_map': { } @@ -532,6 +537,7 @@ def get_query_results( query_id: str, cursor: str = None, docs: int = None, + offset: int = None, **kwargs ) -> typing.Union[QueryPaginationResponse, asyncio.Future]: """Retrieve Query Results Page # noqa: E501 @@ -553,6 +559,7 @@ def get_query_results( query_id (str): [required] cursor (str): Cursor to current page. If unset, will default to the first page.. [optional] docs (int): Number of documents to fetch.. [optional] + offset (int): Offset from the cursor of the first document to be returned. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -619,6 +626,9 @@ def get_query_results( if docs is not None: kwargs['docs'] = \ docs + if offset is not None: + kwargs['offset'] = \ + offset return self.get_query_results_endpoint.call_with_http_info(**kwargs) def list_active_queries( @@ -723,7 +733,7 @@ def query( ), sql=QueryRequestSql( default_row_limit=1, - generate_warnings=True, + generate_warnings=False, initial_paginate_response_doc_count=1, paginate=True, parameters=[ @@ -828,7 +838,7 @@ def validate( ), sql=QueryRequestSql( default_row_limit=1, - generate_warnings=True, + generate_warnings=False, initial_paginate_response_doc_count=1, paginate=True, parameters=[ diff --git a/rockset/api/shared_lambdas_api.py b/rockset/api/shared_lambdas_api.py index 5ee1233..daa3136 100644 --- a/rockset/api/shared_lambdas_api.py +++ b/rockset/api/shared_lambdas_api.py @@ -25,6 +25,7 @@ validate_and_convert_types ) from rockset.model.error_model import ErrorModel +from rockset.model.execute_public_query_lambda_request import ExecutePublicQueryLambdaRequest from rockset.model.query_response import QueryResponse from rockset.models import * @@ -40,20 +41,21 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client - self.execute_public_query_lambda_endpoint = _Endpoint( + self.execute_public_query_lambda_with_params_endpoint = _Endpoint( settings={ 'response_type': (QueryResponse,), 'auth': [ 'apikey' ], 'endpoint_path': '/v1/public/shared_lambdas/{public_access_id}', - 'operation_id': 'execute_public_query_lambda', - 'http_method': 'GET', + 'operation_id': 'execute_public_query_lambda_with_params', + 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'public_access_id', + 'execute_public_query_lambda_request', ], 'required': [ 'public_access_id', @@ -73,12 +75,15 @@ def __init__(self, api_client=None): 'openapi_types': { 'public_access_id': (str,), + 'execute_public_query_lambda_request': + (ExecutePublicQueryLambdaRequest,), }, 'attribute_map': { 'public_access_id': 'public_access_id', }, 'location_map': { 'public_access_id': 'path', + 'execute_public_query_lambda_request': 'body', }, 'collection_format_map': { } @@ -87,26 +92,31 @@ def __init__(self, api_client=None): 'accept': [ 'application/json' ], - 'content_type': [], + 'content_type': [ + 'application/json' + ] }, api_client=api_client ) - def execute_public_query_lambda( + def execute_public_query_lambda_with_params( self, *, public_access_id: str, + default_row_limit: int = None, + generate_warnings: bool = None, + parameters: typing.Sequence[QueryParameter] = None, **kwargs ) -> typing.Union[QueryResponse, asyncio.Future]: """Execute a Public Query Lambda # noqa: E501 - Execute a public query lambda. # noqa: E501 + Execute a public query lambda (full version). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True ```python rs = RocksetClient(api_key=APIKEY) - future = rs.SharedLambdas.execute_public_query_lambda( + future = rs.SharedLambdas.execute_public_query_lambda_with_params( public_access_id="public_access_id_example", async_req=True, ) @@ -115,6 +125,7 @@ def execute_public_query_lambda( Keyword Args: public_access_id (str): public access ID of the query lambda. [required] + execute_public_query_lambda_request (ExecutePublicQueryLambdaRequest): JSON object. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -175,8 +186,10 @@ def execute_public_query_lambda( kwargs['_host_index'] = kwargs.get('_host_index') kwargs['public_access_id'] = \ public_access_id - return self.execute_public_query_lambda_endpoint.call_with_http_info(**kwargs) + return self.execute_public_query_lambda_with_params_endpoint.call_with_http_info(**kwargs) body_params_dict = dict() return_types_dict = dict() + body_params_dict['execute_public_query_lambda_with_params'] = 'execute_public_query_lambda_request' + return_types_dict['execute_public_query_lambda_with_params'] = ExecutePublicQueryLambdaRequest diff --git a/rockset/api/users_api.py b/rockset/api/users_api.py index 08e4678..294cdbf 100644 --- a/rockset/api/users_api.py +++ b/rockset/api/users_api.py @@ -446,6 +446,8 @@ def create( self, *, email: str, + first_name: str = None, + last_name: str = None, roles: typing.Sequence[str] = None, **kwargs ) -> typing.Union[CreateUserResponse, asyncio.Future]: @@ -459,6 +461,8 @@ def create( rs = RocksetClient(api_key=APIKEY) future = rs.Users.create( email="hello@rockset.com", + first_name="John", + last_name="Doe", roles=["admin","member","read-only"], async_req=True, ) @@ -467,6 +471,8 @@ def create( Keyword Args: email (str): User email, must be unique.. [required] + first_name (str): User first name.. [optional] + last_name (str): User last name.. [optional] roles ([str]): List of roles for a given user.. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. diff --git a/rockset/api/virtual_instances_api.py b/rockset/api/virtual_instances_api.py index f803fe5..504779b 100644 --- a/rockset/api/virtual_instances_api.py +++ b/rockset/api/virtual_instances_api.py @@ -26,6 +26,7 @@ ) from rockset.model.collection_mount_response import CollectionMountResponse from rockset.model.create_collection_mount_request import CreateCollectionMountRequest +from rockset.model.create_collection_mounts_response import CreateCollectionMountsResponse from rockset.model.create_virtual_instance_request import CreateVirtualInstanceRequest from rockset.model.create_virtual_instance_response import CreateVirtualInstanceResponse from rockset.model.delete_virtual_instance_response import DeleteVirtualInstanceResponse @@ -412,7 +413,7 @@ def __init__(self, api_client=None): ) self.mount_collection_endpoint = _Endpoint( settings={ - 'response_type': (CollectionMountResponse,), + 'response_type': (CreateCollectionMountsResponse,), 'auth': [ 'apikey' ], @@ -1351,7 +1352,7 @@ def mount_collection( collection_paths: typing.Sequence[str] = None, type: str = None, **kwargs - ) -> typing.Union[CollectionMountResponse, asyncio.Future]: + ) -> typing.Union[CreateCollectionMountsResponse, asyncio.Future]: """Mount Collection # noqa: E501 [beta] Mount a collection to this virtual instance. # noqa: E501 @@ -1404,7 +1405,7 @@ def mount_collection( async_req (bool): execute request asynchronously Returns: - CollectionMountResponse + CreateCollectionMountsResponse If the method is called asynchronously, returns an asyncio.Future which resolves to the response. """ kwargs['async_req'] = kwargs.get( @@ -1462,7 +1463,7 @@ def query_virtual_instance( ), sql=QueryRequestSql( default_row_limit=1, - generate_warnings=True, + generate_warnings=False, initial_paginate_response_doc_count=1, paginate=True, parameters=[ diff --git a/rockset/model/bulk_stats.py b/rockset/model/bulk_stats.py index 6773d18..68f679f 100644 --- a/rockset/model/bulk_stats.py +++ b/rockset/model/bulk_stats.py @@ -83,6 +83,7 @@ def openapi_types(): return { 'data_downloaded_bytes': (int, none_type), # noqa: E501 'data_indexed_bytes': (int, none_type), # noqa: E501 + 'data_indexed_throughput_bytes': (float, none_type), # noqa: E501 'documents_downloaded': (int, none_type), # noqa: E501 'download_compute_ms': (int, none_type), # noqa: E501 'downloading_stage_done_at': (str, none_type), # noqa: E501 @@ -90,9 +91,11 @@ def openapi_types(): 'index_compute_ms': (int, none_type), # noqa: E501 'indexing_stage_done_at': (str, none_type), # noqa: E501 'initializing_stage_done_at': (str, none_type), # noqa: E501 + 'pre_index_size_bytes': (int, none_type), # noqa: E501 'provisioning_stage_done_at': (str, none_type), # noqa: E501 'started_at': (str, none_type), # noqa: E501 'total_index_size_bytes': (int, none_type), # noqa: E501 + 'transformation_compute_ms': (int, none_type), # noqa: E501 } @cached_property @@ -103,6 +106,7 @@ def discriminator(): attribute_map = { 'data_downloaded_bytes': 'data_downloaded_bytes', # noqa: E501 'data_indexed_bytes': 'data_indexed_bytes', # noqa: E501 + 'data_indexed_throughput_bytes': 'data_indexed_throughput_bytes', # noqa: E501 'documents_downloaded': 'documents_downloaded', # noqa: E501 'download_compute_ms': 'download_compute_ms', # noqa: E501 'downloading_stage_done_at': 'downloading_stage_done_at', # noqa: E501 @@ -110,9 +114,11 @@ def discriminator(): 'index_compute_ms': 'index_compute_ms', # noqa: E501 'indexing_stage_done_at': 'indexing_stage_done_at', # noqa: E501 'initializing_stage_done_at': 'initializing_stage_done_at', # noqa: E501 + 'pre_index_size_bytes': 'pre_index_size_bytes', # noqa: E501 'provisioning_stage_done_at': 'provisioning_stage_done_at', # noqa: E501 'started_at': 'started_at', # noqa: E501 'total_index_size_bytes': 'total_index_size_bytes', # noqa: E501 + 'transformation_compute_ms': 'transformation_compute_ms', # noqa: E501 } read_only_vars = { @@ -158,6 +164,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) data_downloaded_bytes (int): Size in bytes of documents downloaded from source during an ongoing or completed bulk ingest. This includes documents that are dropped and reingested.. [optional] # noqa: E501 data_indexed_bytes (int): Size in bytes of documents indexed. This is the total size of documents after transformations and dropping before indexes are built.. [optional] # noqa: E501 + data_indexed_throughput_bytes (float): Throughput of documents indexed in the last minute measured in bytes/s. This is based off the data_indexed_bytes size. Throughput during the download stage is shown on a per-source granularity in the sources field of the Collection response.. [optional] # noqa: E501 documents_downloaded (int): Number of documents downloaded from source during an ongoing or completed bulk ingest. This includes documents that are dropped and reingested.. [optional] # noqa: E501 download_compute_ms (int): Bulk ingest compute units in milliseconds used for downloading documents.. [optional] # noqa: E501 downloading_stage_done_at (str): ISO-8601 date of when the downloading stage was completed.. [optional] # noqa: E501 @@ -165,9 +172,11 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 index_compute_ms (int): Bulk ingest compute units in milliseconds used for indexing documents.. [optional] # noqa: E501 indexing_stage_done_at (str): ISO-8601 date of when the indexing stage was completed.. [optional] # noqa: E501 initializing_stage_done_at (str): ISO-8601 date of when the initializing stage was completed.. [optional] # noqa: E501 + pre_index_size_bytes (int): Size in bytes of documents before being indexed. This is the total size of documents after decompression, transformations, and dropping. This is equal to data_indexed_bytes after the indexing stage is done unless there are retries during indexing the data.. [optional] # noqa: E501 provisioning_stage_done_at (str): ISO-8601 date of when the provisioning stage was completed.. [optional] # noqa: E501 started_at (str): ISO-8601 date of when the bulk ingest was started.. [optional] # noqa: E501 total_index_size_bytes (int): Total size of indexes after the completed bulk ingest. This is the same as collection size.. [optional] # noqa: E501 + transformation_compute_ms (int): Bulk ingest compute units in milliseconds used for ingest transformation.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -221,6 +230,7 @@ def __init__(self, **kwargs): # noqa: E501 Keyword Args: data_downloaded_bytes (int): Size in bytes of documents downloaded from source during an ongoing or completed bulk ingest. This includes documents that are dropped and reingested.. [optional] # noqa: E501 data_indexed_bytes (int): Size in bytes of documents indexed. This is the total size of documents after transformations and dropping before indexes are built.. [optional] # noqa: E501 + data_indexed_throughput_bytes (float): Throughput of documents indexed in the last minute measured in bytes/s. This is based off the data_indexed_bytes size. Throughput during the download stage is shown on a per-source granularity in the sources field of the Collection response.. [optional] # noqa: E501 documents_downloaded (int): Number of documents downloaded from source during an ongoing or completed bulk ingest. This includes documents that are dropped and reingested.. [optional] # noqa: E501 download_compute_ms (int): Bulk ingest compute units in milliseconds used for downloading documents.. [optional] # noqa: E501 downloading_stage_done_at (str): ISO-8601 date of when the downloading stage was completed.. [optional] # noqa: E501 @@ -228,9 +238,11 @@ def __init__(self, **kwargs): # noqa: E501 index_compute_ms (int): Bulk ingest compute units in milliseconds used for indexing documents.. [optional] # noqa: E501 indexing_stage_done_at (str): ISO-8601 date of when the indexing stage was completed.. [optional] # noqa: E501 initializing_stage_done_at (str): ISO-8601 date of when the initializing stage was completed.. [optional] # noqa: E501 + pre_index_size_bytes (int): Size in bytes of documents before being indexed. This is the total size of documents after decompression, transformations, and dropping. This is equal to data_indexed_bytes after the indexing stage is done unless there are retries during indexing the data.. [optional] # noqa: E501 provisioning_stage_done_at (str): ISO-8601 date of when the provisioning stage was completed.. [optional] # noqa: E501 started_at (str): ISO-8601 date of when the bulk ingest was started.. [optional] # noqa: E501 total_index_size_bytes (int): Total size of indexes after the completed bulk ingest. This is the same as collection size.. [optional] # noqa: E501 + transformation_compute_ms (int): Bulk ingest compute units in milliseconds used for ingest transformation.. [optional] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. diff --git a/rockset/model/collection_mount.py b/rockset/model/collection_mount.py index 145b83f..ab2ffc8 100644 --- a/rockset/model/collection_mount.py +++ b/rockset/model/collection_mount.py @@ -29,6 +29,10 @@ from rockset.exceptions import ApiAttributeError +def lazy_import(): + from rockset.model.collection_mount_stats import CollectionMountStats + globals()['CollectionMountStats'] = CollectionMountStats + class CollectionMount(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -58,6 +62,7 @@ class CollectionMount(ModelNormal): ('state',): { 'CREATING': "CREATING", 'ACTIVE': "ACTIVE", + 'REFRESHING': "REFRESHING", 'EXPIRED': "EXPIRED", 'DELETING': "DELETING", }, @@ -76,6 +81,7 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ + lazy_import() return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -90,6 +96,7 @@ def openapi_types(): openapi_types (dict): The key is attribute name and the value is attribute type. """ + lazy_import() return { 'collection_path': (str, none_type), # noqa: E501 'created_at': (str, none_type), # noqa: E501 @@ -97,6 +104,7 @@ def openapi_types(): 'rrn': (str, none_type), # noqa: E501 'snapshot_expiration_time_millis': (int, none_type), # noqa: E501 'state': (str, none_type), # noqa: E501 + 'stats': (CollectionMountStats, none_type), # noqa: E501 'type': (str, none_type), # noqa: E501 'virtual_instance_id': (str, none_type), # noqa: E501 'virtual_instance_rrn': (str, none_type), # noqa: E501 @@ -114,6 +122,7 @@ def discriminator(): 'rrn': 'rrn', # noqa: E501 'snapshot_expiration_time_millis': 'snapshot_expiration_time_millis', # noqa: E501 'state': 'state', # noqa: E501 + 'stats': 'stats', # noqa: E501 'type': 'type', # noqa: E501 'virtual_instance_id': 'virtual_instance_id', # noqa: E501 'virtual_instance_rrn': 'virtual_instance_rrn', # noqa: E501 @@ -166,6 +175,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 rrn (str): Mount RRN.. [optional] # noqa: E501 snapshot_expiration_time_millis (int): Time in millis at which the snapshot expires.. [optional] # noqa: E501 state (str): Mount type.. [optional] # noqa: E501 + stats (CollectionMountStats): [optional] # noqa: E501 type (str): Mount type.. [optional] # noqa: E501 virtual_instance_id (str): Virtual instance ID.. [optional] # noqa: E501 virtual_instance_rrn (str): Virtual Instance RRN.. [optional] # noqa: E501 @@ -226,6 +236,7 @@ def __init__(self, **kwargs): # noqa: E501 rrn (str): Mount RRN.. [optional] # noqa: E501 snapshot_expiration_time_millis (int): Time in millis at which the snapshot expires.. [optional] # noqa: E501 state (str): Mount type.. [optional] # noqa: E501 + stats (CollectionMountStats): [optional] # noqa: E501 type (str): Mount type.. [optional] # noqa: E501 virtual_instance_id (str): Virtual instance ID.. [optional] # noqa: E501 virtual_instance_rrn (str): Virtual Instance RRN.. [optional] # noqa: E501 diff --git a/rockset/model/collection_mount_stats.py b/rockset/model/collection_mount_stats.py new file mode 100644 index 0000000..3ca3b4b --- /dev/null +++ b/rockset/model/collection_mount_stats.py @@ -0,0 +1,257 @@ +""" + REST API + + Rockset's REST API allows for creating and managing all resources in Rockset. Each supported endpoint is documented below. All requests must be authorized with a Rockset API key, which can be created in the [Rockset console](https://console.rockset.com). The API key must be provided as `ApiKey ` in the `Authorization` request header. For example: ``` Authorization: ApiKey aB35kDjg93J5nsf4GjwMeErAVd832F7ad4vhsW1S02kfZiab42sTsfW5Sxt25asT ``` All endpoints are only accessible via https. Build something awesome! # noqa: E501 + + The version of the OpenAPI document: v1 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from rockset.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from rockset.exceptions import ApiAttributeError + + + +class CollectionMountStats(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'last_queried_ms': (int, none_type), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'last_queried_ms': 'last_queried_ms', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CollectionMountStats - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + last_queried_ms (int): Milliseconds since Unix epoch Jan 1, 1970.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, **kwargs): # noqa: E501 + """CollectionMountStats - a model defined in OpenAPI + + Keyword Args: + last_queried_ms (int): Milliseconds since Unix epoch Jan 1, 1970.. [optional] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + args = [] + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + # todo: remove these comments - this stops the user from setting read only vars but we need this now to address a bug + # if var_name in self.read_only_vars: + # raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + # f"class with read only attributes.") diff --git a/rockset/model/create_collection_mounts_response.py b/rockset/model/create_collection_mounts_response.py new file mode 100644 index 0000000..85536f0 --- /dev/null +++ b/rockset/model/create_collection_mounts_response.py @@ -0,0 +1,263 @@ +""" + REST API + + Rockset's REST API allows for creating and managing all resources in Rockset. Each supported endpoint is documented below. All requests must be authorized with a Rockset API key, which can be created in the [Rockset console](https://console.rockset.com). The API key must be provided as `ApiKey ` in the `Authorization` request header. For example: ``` Authorization: ApiKey aB35kDjg93J5nsf4GjwMeErAVd832F7ad4vhsW1S02kfZiab42sTsfW5Sxt25asT ``` All endpoints are only accessible via https. Build something awesome! # noqa: E501 + + The version of the OpenAPI document: v1 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from rockset.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from rockset.exceptions import ApiAttributeError + + +def lazy_import(): + from rockset.model.collection_mount import CollectionMount + globals()['CollectionMount'] = CollectionMount + + +class CreateCollectionMountsResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': ([CollectionMount], none_type), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CreateCollectionMountsResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + data ([CollectionMount]): Mounts created.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, **kwargs): # noqa: E501 + """CreateCollectionMountsResponse - a model defined in OpenAPI + + Keyword Args: + data ([CollectionMount]): Mounts created.. [optional] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + args = [] + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + # todo: remove these comments - this stops the user from setting read only vars but we need this now to address a bug + # if var_name in self.read_only_vars: + # raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + # f"class with read only attributes.") diff --git a/rockset/model/create_user_request.py b/rockset/model/create_user_request.py index 33e630e..db75bf9 100644 --- a/rockset/model/create_user_request.py +++ b/rockset/model/create_user_request.py @@ -83,6 +83,8 @@ def openapi_types(): return { 'email': (str,), # noqa: E501 'roles': ([str],), # noqa: E501 + 'first_name': (str, none_type), # noqa: E501 + 'last_name': (str, none_type), # noqa: E501 } @cached_property @@ -93,6 +95,8 @@ def discriminator(): attribute_map = { 'email': 'email', # noqa: E501 'roles': 'roles', # noqa: E501 + 'first_name': 'first_name', # noqa: E501 + 'last_name': 'last_name', # noqa: E501 } read_only_vars = { @@ -140,6 +144,8 @@ def _from_openapi_data(cls, email, roles, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + first_name (str): User first name.. [optional] # noqa: E501 + last_name (str): User last name.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -195,6 +201,8 @@ def __init__(self, *, email, roles, **kwargs): # noqa: E501 Keyword Args: email (str): User email, must be unique. roles ([str]): List of roles for a given user. + first_name (str): User first name.. [optional] # noqa: E501 + last_name (str): User last name.. [optional] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. diff --git a/rockset/model/error_model.py b/rockset/model/error_model.py index 33deb76..78ffd6a 100644 --- a/rockset/model/error_model.py +++ b/rockset/model/error_model.py @@ -72,12 +72,12 @@ class ErrorModel(ModelNormal): 'NOT_READY': "NOT_READY", 'FORBIDDEN': "FORBIDDEN", 'QUERY_TIMEOUT': "QUERY_TIMEOUT", - 'ROLE_NOT_FOUND': "ROLE_NOT_FOUND", 'CONNECTION_ERROR': "CONNECTION_ERROR", 'CONTENTTOOLARGE': "CONTENTTOOLARGE", 'CREATING': "CREATING", 'BADREQUEST': "BADREQUEST", 'SERVICEUNAVAILABLE': "SERVICEUNAVAILABLE", + 'CONFLICT': "CONFLICT", 'RATELIMITEXCEEDED': "RATELIMITEXCEEDED", 'QUERY_CANCELLED': "QUERY_CANCELLED", 'CLIENT_CONNECTION_ERROR': "CLIENT_CONNECTION_ERROR", diff --git a/rockset/model/execute_public_query_lambda_request.py b/rockset/model/execute_public_query_lambda_request.py new file mode 100644 index 0000000..e9ee7d5 --- /dev/null +++ b/rockset/model/execute_public_query_lambda_request.py @@ -0,0 +1,271 @@ +""" + REST API + + Rockset's REST API allows for creating and managing all resources in Rockset. Each supported endpoint is documented below. All requests must be authorized with a Rockset API key, which can be created in the [Rockset console](https://console.rockset.com). The API key must be provided as `ApiKey ` in the `Authorization` request header. For example: ``` Authorization: ApiKey aB35kDjg93J5nsf4GjwMeErAVd832F7ad4vhsW1S02kfZiab42sTsfW5Sxt25asT ``` All endpoints are only accessible via https. Build something awesome! # noqa: E501 + + The version of the OpenAPI document: v1 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from rockset.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from rockset.exceptions import ApiAttributeError + + +def lazy_import(): + from rockset.model.query_parameter import QueryParameter + globals()['QueryParameter'] = QueryParameter + + +class ExecutePublicQueryLambdaRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'default_row_limit': (int, none_type), # noqa: E501 + 'generate_warnings': (bool, none_type), # noqa: E501 + 'parameters': ([QueryParameter], none_type), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'default_row_limit': 'default_row_limit', # noqa: E501 + 'generate_warnings': 'generate_warnings', # noqa: E501 + 'parameters': 'parameters', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ExecutePublicQueryLambdaRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + default_row_limit (int): Row limit to use if no limit specified in the SQL query text.. [optional] # noqa: E501 + generate_warnings (bool): Whether to generate warnings.. [optional] # noqa: E501 + parameters ([QueryParameter]): List of named parameters.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, **kwargs): # noqa: E501 + """ExecutePublicQueryLambdaRequest - a model defined in OpenAPI + + Keyword Args: + default_row_limit (int): Row limit to use if no limit specified in the SQL query text.. [optional] # noqa: E501 + generate_warnings (bool): Whether to generate warnings.. [optional] # noqa: E501 + parameters ([QueryParameter]): List of named parameters.. [optional] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + args = [] + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + # todo: remove these comments - this stops the user from setting read only vars but we need this now to address a bug + # if var_name in self.read_only_vars: + # raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + # f"class with read only attributes.") diff --git a/rockset/model/privilege.py b/rockset/model/privilege.py index fc33340..1267ca6 100644 --- a/rockset/model/privilege.py +++ b/rockset/model/privilege.py @@ -95,6 +95,8 @@ class Privilege(ModelNormal): 'CREATE_QUERY_LAMBDA_WS': "CREATE_QUERY_LAMBDA_WS", 'DELETE_QUERY_LAMBDA_WS': "DELETE_QUERY_LAMBDA_WS", 'EXECUTE_QUERY_LAMBDA_WS': "EXECUTE_QUERY_LAMBDA_WS", + 'CREATE_SCHEDULED_LAMBDA_WS': "CREATE_SCHEDULED_LAMBDA_WS", + 'DELETE_SCHEDULED_LAMBDA_WS': "DELETE_SCHEDULED_LAMBDA_WS", 'CREATE_VIEW_WS': "CREATE_VIEW_WS", 'DELETE_VIEW_WS': "DELETE_VIEW_WS", 'ALL_VI_ACTIONS': "ALL_VI_ACTIONS", diff --git a/rockset/model/query_request_sql.py b/rockset/model/query_request_sql.py index f8bcc06..21043cb 100644 --- a/rockset/model/query_request_sql.py +++ b/rockset/model/query_request_sql.py @@ -156,7 +156,7 @@ def _from_openapi_data(cls, query, *args, **kwargs): # noqa: E501 default_row_limit (int): Row limit to use. Limits specified in the query text will override this default.. [optional] # noqa: E501 generate_warnings (bool): Flag to enable warnings. Warnings can help debug query issues but negatively affect performance.. [optional] # noqa: E501 initial_paginate_response_doc_count (int): Number of documents to return in addition to paginating for this query call. Only relevant if `paginate` flag is also set.. [optional] # noqa: E501 - paginate (bool): Flag to paginate and store the results of this query for later / sequential retrieval.. [optional] # noqa: E501 + paginate (bool): Flag to paginate and store the results of this query for later sequential retrieval.. [optional] # noqa: E501 parameters ([QueryParameter]): List of named parameters.. [optional] # noqa: E501 """ @@ -214,7 +214,7 @@ def __init__(self, *, query, **kwargs): # noqa: E501 default_row_limit (int): Row limit to use. Limits specified in the query text will override this default.. [optional] # noqa: E501 generate_warnings (bool): Flag to enable warnings. Warnings can help debug query issues but negatively affect performance.. [optional] # noqa: E501 initial_paginate_response_doc_count (int): Number of documents to return in addition to paginating for this query call. Only relevant if `paginate` flag is also set.. [optional] # noqa: E501 - paginate (bool): Flag to paginate and store the results of this query for later / sequential retrieval.. [optional] # noqa: E501 + paginate (bool): Flag to paginate and store the results of this query for later sequential retrieval.. [optional] # noqa: E501 parameters ([QueryParameter]): List of named parameters.. [optional] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be diff --git a/rockset/model/status.py b/rockset/model/status.py index c6dd3d0..75b0175 100644 --- a/rockset/model/status.py +++ b/rockset/model/status.py @@ -88,6 +88,7 @@ def openapi_types(): and the value is attribute type. """ return { + 'detected_size_bytes': (int, none_type), # noqa: E501 'last_processed_at': (str, none_type), # noqa: E501 'last_processed_item': (str, none_type), # noqa: E501 'message': (str, none_type), # noqa: E501 @@ -101,6 +102,7 @@ def discriminator(): attribute_map = { + 'detected_size_bytes': 'detected_size_bytes', # noqa: E501 'last_processed_at': 'last_processed_at', # noqa: E501 'last_processed_item': 'last_processed_item', # noqa: E501 'message': 'message', # noqa: E501 @@ -149,6 +151,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + detected_size_bytes (int): Size in bytes detected for the source at collection initialization. This size can be 0 or null for event stream sources.. [optional] # noqa: E501 last_processed_at (str): ISO-8601 date when source was last processed.. [optional] # noqa: E501 last_processed_item (str): Last source item processed by ingester.. [optional] # noqa: E501 message (str): State message.. [optional] # noqa: E501 @@ -205,6 +208,7 @@ def __init__(self, **kwargs): # noqa: E501 """Status - a model defined in OpenAPI Keyword Args: + detected_size_bytes (int): Size in bytes detected for the source at collection initialization. This size can be 0 or null for event stream sources.. [optional] # noqa: E501 last_processed_at (str): ISO-8601 date when source was last processed.. [optional] # noqa: E501 last_processed_item (str): Last source item processed by ingester.. [optional] # noqa: E501 message (str): State message.. [optional] # noqa: E501 diff --git a/rockset/models/__init__.py b/rockset/models/__init__.py index 0093719..8114e4f 100644 --- a/rockset/models/__init__.py +++ b/rockset/models/__init__.py @@ -33,12 +33,14 @@ from rockset.model.collection import Collection from rockset.model.collection_mount import CollectionMount from rockset.model.collection_mount_response import CollectionMountResponse +from rockset.model.collection_mount_stats import CollectionMountStats from rockset.model.collection_stats import CollectionStats from rockset.model.create_alias_request import CreateAliasRequest from rockset.model.create_alias_response import CreateAliasResponse from rockset.model.create_api_key_request import CreateApiKeyRequest from rockset.model.create_api_key_response import CreateApiKeyResponse from rockset.model.create_collection_mount_request import CreateCollectionMountRequest +from rockset.model.create_collection_mounts_response import CreateCollectionMountsResponse from rockset.model.create_collection_request import CreateCollectionRequest from rockset.model.create_collection_response import CreateCollectionResponse from rockset.model.create_integration_request import CreateIntegrationRequest @@ -74,6 +76,7 @@ from rockset.model.dynamodb_source_wrapper import DynamodbSourceWrapper from rockset.model.error_model import ErrorModel from rockset.model.event_time_info import EventTimeInfo +from rockset.model.execute_public_query_lambda_request import ExecutePublicQueryLambdaRequest from rockset.model.execute_query_lambda_request import ExecuteQueryLambdaRequest from rockset.model.field_mapping_query import FieldMappingQuery from rockset.model.field_mapping_v2 import FieldMappingV2 diff --git a/swagger/modified-openapi.yaml b/swagger/modified-openapi.yaml index 83bb0be..f7cf6b2 100644 --- a/swagger/modified-openapi.yaml +++ b/swagger/modified-openapi.yaml @@ -454,6 +454,15 @@ components: example: 8000000 format: int64 type: integer + data_indexed_throughput_bytes: + description: + Throughput of documents indexed in the last minute measured + in bytes/s. This is based off the data_indexed_bytes size. Throughput + during the download stage is shown on a per-source granularity in the + sources field of the Collection response. + example: 800000.5 + format: double + type: number documents_downloaded: description: Number of documents downloaded from source during an ongoing @@ -492,6 +501,15 @@ components: description: ISO-8601 date of when the initializing stage was completed. example: "2001-08-28T00:23:41Z" type: string + pre_index_size_bytes: + description: + Size in bytes of documents before being indexed. This is the + total size of documents after decompression, transformations, and dropping. + This is equal to data_indexed_bytes after the indexing stage is done unless + there are retries during indexing the data. + example: 8000000 + format: int64 + type: integer provisioning_stage_done_at: description: ISO-8601 date of when the provisioning stage was completed. example: "2001-08-28T00:23:41Z" @@ -507,6 +525,11 @@ components: example: 10000000 format: int64 type: integer + transformation_compute_ms: + description: Bulk ingest compute units in milliseconds used for ingest transformation. + example: 50000 + format: int64 + type: integer type: object CancelQueryResponse: properties: @@ -655,10 +678,14 @@ components: enum: - CREATING - ACTIVE + - REFRESHING - EXPIRED - DELETING example: ACTIVE type: string + stats: + $ref: "#/components/schemas/CollectionMountStats" + description: Stats about this Collection Mount type: description: Mount type. enum: @@ -681,6 +708,14 @@ components: $ref: "#/components/schemas/CollectionMount" description: Resource mount object. type: object + CollectionMountStats: + properties: + last_queried_ms: + description: Milliseconds since Unix epoch Jan 1, 1970. + example: 1535101119334 + format: int64 + type: integer + type: object CollectionStats: properties: bulk_bytes_inserted: @@ -831,6 +866,14 @@ components: example: STATIC type: string type: object + CreateCollectionMountsResponse: + properties: + data: + description: Mounts created. + items: + $ref: "#/components/schemas/CollectionMount" + type: array + type: object CreateCollectionRequest: properties: clustering_key: @@ -984,6 +1027,14 @@ components: description: User email, must be unique. example: hello@rockset.com type: string + first_name: + description: User first name. + example: John + type: string + last_name: + description: User last name. + example: Doe + type: string roles: description: List of roles for a given user. example: @@ -1397,12 +1448,12 @@ components: - NOT_READY - FORBIDDEN - QUERY_TIMEOUT - - ROLE_NOT_FOUND - CONNECTION_ERROR - CONTENTTOOLARGE - CREATING - BADREQUEST - SERVICEUNAVAILABLE + - CONFLICT - RATELIMITEXCEEDED - QUERY_CANCELLED - CLIENT_CONNECTION_ERROR @@ -1428,6 +1479,21 @@ components: required: - field type: object + ExecutePublicQueryLambdaRequest: + properties: + default_row_limit: + description: Row limit to use if no limit specified in the SQL query text. + format: int32 + type: integer + generate_warnings: + description: Whether to generate warnings. + type: boolean + parameters: + description: List of named parameters. + items: + $ref: "#/components/schemas/QueryParameter" + type: array + type: object ExecuteQueryLambdaRequest: properties: async_options: @@ -2479,6 +2545,8 @@ components: - CREATE_QUERY_LAMBDA_WS - DELETE_QUERY_LAMBDA_WS - EXECUTE_QUERY_LAMBDA_WS + - CREATE_SCHEDULED_LAMBDA_WS + - DELETE_SCHEDULED_LAMBDA_WS - CREATE_VIEW_WS - DELETE_VIEW_WS - ALL_VI_ACTIONS @@ -2780,6 +2848,7 @@ components: description: Flag to enable warnings. Warnings can help debug query issues but negatively affect performance. + example: false type: boolean initial_paginate_response_doc_count: description: @@ -2790,7 +2859,7 @@ components: paginate: description: Flag to paginate and store the results of this query for later - / sequential retrieval. + sequential retrieval. type: boolean parameters: description: List of named parameters. @@ -3498,6 +3567,12 @@ components: type: object Status: properties: + detected_size_bytes: + description: + Size in bytes detected for the source at collection initialization. + This size can be 0 or null for event stream sources. + format: int64 + type: integer last_processed_at: description: ISO-8601 date when source was last processed. example: "2019-01-15T21:48:23Z" @@ -6287,6 +6362,13 @@ paths: schema: format: int32 type: integer + - description: Offset from the cursor of the first document to be returned + in: query + name: offset + required: false + schema: + format: int32 + type: integer responses: "200": content: @@ -8904,7 +8986,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CollectionMountResponse" + $ref: "#/components/schemas/CreateCollectionMountsResponse" description: collection mounted "400": content: @@ -13944,9 +14026,9 @@ paths: - Views x-rename: update /v1/public/shared_lambdas/{public_access_id}: - get: - description: Execute a public query lambda. - operationId: executePublicQueryLambda + post: + description: Execute a public query lambda (full version). + operationId: executePublicQueryLambdaWithParams parameters: - description: public access ID of the query lambda in: path @@ -13954,6 +14036,12 @@ paths: required: true schema: type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ExecutePublicQueryLambdaRequest" + description: JSON object responses: "200": content: diff --git a/swagger/openapi-generated.yaml b/swagger/openapi-generated.yaml index 62169c2..fa3042f 100644 --- a/swagger/openapi-generated.yaml +++ b/swagger/openapi-generated.yaml @@ -1283,6 +1283,13 @@ paths: schema: format: int32 type: integer + - description: Offset from the cursor of the first document to be returned + in: query + name: offset + required: false + schema: + format: int32 + type: integer responses: "200": content: @@ -3893,7 +3900,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CollectionMountResponse" + $ref: "#/components/schemas/CreateCollectionMountsResponse" description: collection mounted "400": content: @@ -7871,7 +7878,7 @@ paths: summary: Update View x-rename: update "/v1/public/shared_lambdas/{public_access_id}": - get: + post: parameters: - description: public access ID of the query lambda in: path @@ -7966,8 +7973,14 @@ paths: description: not ready tags: - Shared Lambdas - description: Execute a public query lambda. - operationId: executePublicQueryLambda + description: Execute a public query lambda (full version). + operationId: executePublicQueryLambdaWithParams + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ExecutePublicQueryLambdaRequest" + description: JSON object summary: Execute a Public Query Lambda components: requestBodies: @@ -8192,6 +8205,15 @@ components: example: 8000000 format: int64 type: integer + data_indexed_throughput_bytes: + description: >- + Throughput of documents indexed in the last minute measured in + bytes/s. This is based off the data_indexed_bytes size. Throughput + during the download stage is shown on a per-source granularity in + the sources field of the Collection response. + example: 800000.5 + format: double + type: number documents_downloaded: description: >- Number of documents downloaded from source during an ongoing or @@ -8230,6 +8252,15 @@ components: description: ISO-8601 date of when the initializing stage was completed. example: "2001-08-28T00:23:41Z" type: string + pre_index_size_bytes: + description: >- + Size in bytes of documents before being indexed. This is the total + size of documents after decompression, transformations, and + dropping. This is equal to data_indexed_bytes after the indexing + stage is done unless there are retries during indexing the data. + example: 8000000 + format: int64 + type: integer provisioning_stage_done_at: description: ISO-8601 date of when the provisioning stage was completed. example: "2001-08-28T00:23:41Z" @@ -8245,6 +8276,13 @@ components: example: 10000000 format: int64 type: integer + transformation_compute_ms: + description: >- + Bulk ingest compute units in milliseconds used for ingest + transformation. + example: 50000 + format: int64 + type: integer type: object CancelQueryResponse: properties: @@ -8391,10 +8429,14 @@ components: enum: - CREATING - ACTIVE + - REFRESHING - EXPIRED - DELETING example: ACTIVE type: string + stats: + $ref: "#/components/schemas/CollectionMountStats" + description: Stats about this Collection Mount type: description: Mount type. enum: @@ -8417,6 +8459,14 @@ components: $ref: "#/components/schemas/CollectionMount" description: Resource mount object. type: object + CollectionMountStats: + properties: + last_queried_ms: + description: "Milliseconds since Unix epoch Jan 1, 1970." + example: 1535101119334 + format: int64 + type: integer + type: object CollectionStats: properties: bulk_bytes_inserted: @@ -8563,6 +8613,14 @@ components: example: STATIC type: string type: object + CreateCollectionMountsResponse: + properties: + data: + description: Mounts created. + items: + $ref: "#/components/schemas/CollectionMount" + type: array + type: object CreateCollectionRequest: properties: clustering_key: @@ -8717,6 +8775,14 @@ components: description: "User email, must be unique." example: hello@rockset.com type: string + first_name: + description: User first name. + example: John + type: string + last_name: + description: User last name. + example: Doe + type: string roles: description: List of roles for a given user. example: '["admin", "member", "read-only"]' @@ -9034,12 +9100,12 @@ components: - NOT_READY - FORBIDDEN - QUERY_TIMEOUT - - ROLE_NOT_FOUND - CONNECTION_ERROR - CONTENTTOOLARGE - CREATING - BADREQUEST - SERVICEUNAVAILABLE + - CONFLICT - RATELIMITEXCEEDED - QUERY_CANCELLED - CLIENT_CONNECTION_ERROR @@ -9065,6 +9131,21 @@ components: required: - field type: object + ExecutePublicQueryLambdaRequest: + properties: + parameters: + description: List of named parameters. + items: + $ref: "#/components/schemas/QueryParameter" + type: array + default_row_limit: + description: Row limit to use if no limit specified in the SQL query text. + format: int32 + type: integer + generate_warnings: + description: Whether to generate warnings. + type: boolean + type: object ExecuteQueryLambdaRequest: properties: parameters: @@ -9709,6 +9790,8 @@ components: - CREATE_QUERY_LAMBDA_WS - DELETE_QUERY_LAMBDA_WS - EXECUTE_QUERY_LAMBDA_WS + - CREATE_SCHEDULED_LAMBDA_WS + - DELETE_SCHEDULED_LAMBDA_WS - CREATE_VIEW_WS - DELETE_VIEW_WS - ALL_VI_ACTIONS @@ -10015,6 +10098,7 @@ components: description: >- Flag to enable warnings. Warnings can help debug query issues but negatively affect performance. + example: false type: boolean initial_paginate_response_doc_count: description: >- @@ -10024,7 +10108,7 @@ components: type: integer paginate: description: >- - Flag to paginate and store the results of this query for later / + Flag to paginate and store the results of this query for later sequential retrieval. type: boolean query: @@ -10582,6 +10666,12 @@ components: type: object Status: properties: + detected_size_bytes: + description: >- + Size in bytes detected for the source at collection initialization. + This size can be 0 or null for event stream sources. + format: int64 + type: integer last_processed_at: description: ISO-8601 date when source was last processed. example: "2019-01-15T21:48:23Z" diff --git a/templates/README_common.mustache b/templates/README_common.mustache index 61273ec..98534d5 100644 --- a/templates/README_common.mustache +++ b/templates/README_common.mustache @@ -21,6 +21,25 @@ except {{{packageName}}}.ApiException as e: {{/apiInfo}} ``` +**Note:** If you receive SSL Errors while using the client, this could be caused by your python installation. One possible fix is running the following commands: + +```sh +CERT_PATH=$(python3 -m certifi) +export SSL_CERT_FILE=${CERT_PATH} +export REQUESTS_CA_BUNDLE=${CERT_PATH} +``` + +As a last resort, you can configure the client to avoid certificate verification. Note that you will receive warnings from urllib3 when requests are made. + +```python +from rockset import RocksetClient, Regions, Configuration + +config = Configuration(api_key=KEY) +config.verify_ssl = False + +rs = RocksetClient(host=Regions.rs2, config=config) +``` + ## Optional Models When making requests, certain parameters will oftentimes be instances of classes (eg. rockset.models.QueryRequestSql). Since importing and instantiating these objects can be verbose, you always have the option of passing in a dictionary instead of a model. diff --git a/test/test_collection_mount_stats.py b/test/test_collection_mount_stats.py new file mode 100644 index 0000000..77a4312 --- /dev/null +++ b/test/test_collection_mount_stats.py @@ -0,0 +1,16 @@ +""" + REST API + + Rockset's REST API allows for creating and managing all resources in Rockset. Each supported endpoint is documented below. All requests must be authorized with a Rockset API key, which can be created in the [Rockset console](https://console.rockset.com). The API key must be provided as `ApiKey ` in the `Authorization` request header. For example: ``` Authorization: ApiKey aB35kDjg93J5nsf4GjwMeErAVd832F7ad4vhsW1S02kfZiab42sTsfW5Sxt25asT ``` All endpoints are only accessible via https. Build something awesome! # noqa: E501 + + The version of the OpenAPI document: v1 + Generated by: https://openapi-generator.tech +""" + + +import sys +from rockset.models import * + + +def test_collection_mount_stats_init(): + CollectionMountStats() diff --git a/test/test_create_collection_mounts_response.py b/test/test_create_collection_mounts_response.py new file mode 100644 index 0000000..6e67a32 --- /dev/null +++ b/test/test_create_collection_mounts_response.py @@ -0,0 +1,16 @@ +""" + REST API + + Rockset's REST API allows for creating and managing all resources in Rockset. Each supported endpoint is documented below. All requests must be authorized with a Rockset API key, which can be created in the [Rockset console](https://console.rockset.com). The API key must be provided as `ApiKey ` in the `Authorization` request header. For example: ``` Authorization: ApiKey aB35kDjg93J5nsf4GjwMeErAVd832F7ad4vhsW1S02kfZiab42sTsfW5Sxt25asT ``` All endpoints are only accessible via https. Build something awesome! # noqa: E501 + + The version of the OpenAPI document: v1 + Generated by: https://openapi-generator.tech +""" + + +import sys +from rockset.models import * + + +def test_create_collection_mounts_response_init(): + CreateCollectionMountsResponse() diff --git a/test/test_execute_public_query_lambda_request.py b/test/test_execute_public_query_lambda_request.py new file mode 100644 index 0000000..415d15b --- /dev/null +++ b/test/test_execute_public_query_lambda_request.py @@ -0,0 +1,16 @@ +""" + REST API + + Rockset's REST API allows for creating and managing all resources in Rockset. Each supported endpoint is documented below. All requests must be authorized with a Rockset API key, which can be created in the [Rockset console](https://console.rockset.com). The API key must be provided as `ApiKey ` in the `Authorization` request header. For example: ``` Authorization: ApiKey aB35kDjg93J5nsf4GjwMeErAVd832F7ad4vhsW1S02kfZiab42sTsfW5Sxt25asT ``` All endpoints are only accessible via https. Build something awesome! # noqa: E501 + + The version of the OpenAPI document: v1 + Generated by: https://openapi-generator.tech +""" + + +import sys +from rockset.models import * + + +def test_execute_public_query_lambda_request_init(): + ExecutePublicQueryLambdaRequest() diff --git a/test/test_queries_api.py b/test/test_queries_api.py index cb43114..6cdb68d 100644 --- a/test/test_queries_api.py +++ b/test/test_queries_api.py @@ -68,7 +68,7 @@ def test_query(get_client, mock_request, request_validator): ), sql=QueryRequestSql( default_row_limit=1, - generate_warnings=True, + generate_warnings=False, initial_paginate_response_doc_count=1, paginate=True, parameters=[ @@ -97,7 +97,7 @@ def test_validate(get_client, mock_request, request_validator): ), sql=QueryRequestSql( default_row_limit=1, - generate_warnings=True, + generate_warnings=False, initial_paginate_response_doc_count=1, paginate=True, parameters=[ diff --git a/test/test_query_request.py b/test/test_query_request.py index c341ceb..9a6710d 100644 --- a/test/test_query_request.py +++ b/test/test_query_request.py @@ -16,7 +16,7 @@ def test_query_request_init(): QueryRequest( sql=QueryRequestSql( default_row_limit=1, - generate_warnings=True, + generate_warnings=False, initial_paginate_response_doc_count=1, paginate=True, parameters=[ diff --git a/test/test_shared_lambdas_api.py b/test/test_shared_lambdas_api.py index 6cdf1ce..122a88f 100644 --- a/test/test_shared_lambdas_api.py +++ b/test/test_shared_lambdas_api.py @@ -14,11 +14,13 @@ from test.conftest import EarlyExit, validate_call -def test_execute_public_query_lambda(get_client, mock_request, request_validator): +def test_execute_public_query_lambda_with_params( + get_client, mock_request, request_validator +): with mock_request: rs = get_client try: - rs.SharedLambdas.execute_public_query_lambda( + rs.SharedLambdas.execute_public_query_lambda_with_params( public_access_id="public_access_id_example", ) except EarlyExit as e: diff --git a/test/test_users_api.py b/test/test_users_api.py index 2992afa..dfb74b1 100644 --- a/test/test_users_api.py +++ b/test/test_users_api.py @@ -20,6 +20,8 @@ def test_create(get_client, mock_request, request_validator): try: rs.Users.create( email="hello@rockset.com", + first_name="John", + last_name="Doe", roles=["admin", "member", "read-only"], ) except EarlyExit as e: diff --git a/test/test_virtual_instances_api.py b/test/test_virtual_instances_api.py index 95ae371..b2ba130 100644 --- a/test/test_virtual_instances_api.py +++ b/test/test_virtual_instances_api.py @@ -119,7 +119,7 @@ def test_query_virtual_instance(get_client, mock_request, request_validator): ), sql=QueryRequestSql( default_row_limit=1, - generate_warnings=True, + generate_warnings=False, initial_paginate_response_doc_count=1, paginate=True, parameters=[