FinSpaceData

Table of Contents

Client

class FinSpaceData.Client

A low-level client representing FinSpace Public API (FinSpace Data)

The FinSpace APIs let you take actions inside the FinSpace environment.

import boto3

client = boto3.client('finspace-data')

These are the available methods:

can_paginate(operation_name)

Check if an operation can be paginated.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Returns
True if the operation can be paginated, False otherwise.
create_changeset(**kwargs)

Creates a new changeset in a FinSpace dataset.

See also: AWS API Documentation

Request Syntax

response = client.create_changeset(
    datasetId='string',
    changeType='REPLACE'|'APPEND'|'MODIFY',
    sourceType='S3',
    sourceParams={
        'string': 'string'
    },
    formatType='CSV'|'JSON'|'PARQUET'|'XML',
    formatParams={
        'string': 'string'
    },
    tags={
        'string': 'string'
    }
)
Parameters
  • datasetId (string) --

    [REQUIRED]

    The unique identifier for the FinSpace dataset in which the changeset will be created.

  • changeType (string) --

    [REQUIRED]

    Option to indicate how a changeset will be applied to a dataset.

    • REPLACE - Changeset will be considered as a replacement to all prior loaded changesets.
    • APPEND - Changeset will be considered as an addition to the end of all prior loaded changesets.
  • sourceType (string) --

    [REQUIRED]

    Type of the data source from which the files to create the changeset will be sourced.

    • S3 - Amazon S3.
  • sourceParams (dict) --

    [REQUIRED]

    Source path from which the files to create the changeset will be sourced.

    • (string) --
      • (string) --
  • formatType (string) -- Format type of the input files being loaded into the changeset.
  • formatParams (dict) --

    Options that define the structure of the source file(s).

    • (string) --
      • (string) --
  • tags (dict) --

    Metadata tags to apply to this changeset.

    • (string) --
      • (string) --
Return type

dict

Returns

Response Syntax

{
    'changeset': {
        'id': 'string',
        'changesetArn': 'string',
        'datasetId': 'string',
        'changeType': 'REPLACE'|'APPEND'|'MODIFY',
        'sourceType': 'S3',
        'sourceParams': {
            'string': 'string'
        },
        'formatType': 'CSV'|'JSON'|'PARQUET'|'XML',
        'formatParams': {
            'string': 'string'
        },
        'createTimestamp': datetime(2015, 1, 1),
        'status': 'PENDING'|'FAILED'|'SUCCESS'|'RUNNING'|'STOP_REQUESTED',
        'errorInfo': {
            'errorMessage': 'string',
            'errorCategory': 'The_inputs_to_this_request_are_invalid'|'Service_limits_have_been_exceeded'|'Missing_required_permission_to_perform_this_request'|'One_or_more_inputs_to_this_request_were_not_found'|'The_system_temporarily_lacks_sufficient_resources_to_process_the_request'|'An_internal_error_has_occurred'|'Cancelled'|'A_user_recoverable_error_has_occurred'
        },
        'changesetLabels': {
            'string': 'string'
        },
        'updatesChangesetId': 'string',
        'updatedByChangesetId': 'string'
    }
}

Response Structure

  • (dict) --

    • changeset (dict) --

      Returns the changeset details.

      • id (string) --

        Unique identifier for a changeset.

      • changesetArn (string) --

        The ARN identifier of the changeset.

      • datasetId (string) --

        The unique identifier for the FinSpace dataset in which the changeset is created.

      • changeType (string) --

        Change type indicates how a changeset is applied to a dataset.

        • REPLACE - Changeset is considered as a replacement to all prior loaded changesets.
        • APPEND - Changeset is considered as an addition to the end of all prior loaded changesets.
        • MODIFY - Changeset is considered as a replacement to a specific prior ingested changeset.
      • sourceType (string) --

        Type of the data source from which the files to create the changeset are sourced.

        • S3 - Amazon S3.
      • sourceParams (dict) --

        Source path from which the files to create the changeset are sourced.

        • (string) --
          • (string) --
      • formatType (string) --

        Format type of the input files loaded into the changeset.

      • formatParams (dict) --

        Structure of the source file(s).

        • (string) --
          • (string) --
      • createTimestamp (datetime) --

        The timestamp at which the changeset was created in FinSpace.

      • status (string) --

        The status of changeset creation operation.

      • errorInfo (dict) --

        The structure with error messages.

        • errorMessage (string) --

          The text of the error message.

        • errorCategory (string) --

          The category of the error.

          • VALIDATION -The inputs to this request are invalid.
          • SERVICE_QUOTA_EXCEEDED - Service quotas have been exceeded. Please contact AWS support to increase quotas.
          • ACCESS_DENIED - Missing required permission to perform this request.
          • RESOURCE_NOT_FOUND - One or more inputs to this request were not found.
          • THROTTLING - The system temporarily lacks sufficient resources to process the request.
          • INTERNAL_SERVICE_EXCEPTION - An internal service error has occurred.
          • CANCELLED - A user recoverable error has occurred.
      • changesetLabels (dict) --

        Tags associated with the changeset.

        • (string) --
          • (string) --
      • updatesChangesetId (string) --

        Unique identifier of the changeset that is updated.

      • updatedByChangesetId (string) --

        Unique identifier of the changeset that is updated a changeset.

Exceptions

  • FinSpaceData.Client.exceptions.ResourceNotFoundException
  • FinSpaceData.Client.exceptions.InternalServerException
  • FinSpaceData.Client.exceptions.ValidationException
  • FinSpaceData.Client.exceptions.ThrottlingException
  • FinSpaceData.Client.exceptions.AccessDeniedException
get_paginator(operation_name)

Create a paginator for an operation.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Raises OperationNotPageableError
Raised if the operation is not pageable. You can use the client.can_paginate method to check if an operation is pageable.
Return type
L{botocore.paginate.Paginator}
Returns
A paginator object.
get_programmatic_access_credentials(**kwargs)

Request programmatic credentials to use with Habanero SDK.

See also: AWS API Documentation

Request Syntax

response = client.get_programmatic_access_credentials(
    durationInMinutes=123,
    environmentId='string'
)
Parameters
  • durationInMinutes (integer) -- The time duration in which the credentials remain valid.
  • environmentId (string) --

    [REQUIRED]

    The habanero environment identifier.

Return type

dict

Returns

Response Syntax

{
    'credentials': {
        'accessKeyId': 'string',
        'secretAccessKey': 'string',
        'sessionToken': 'string'
    },
    'durationInMinutes': 123
}

Response Structure

  • (dict) --

    • credentials (dict) --

      Returns the programmatic credentials.

      • accessKeyId (string) --

        The access key identifier.

      • secretAccessKey (string) --

        The access key.

      • sessionToken (string) --

        The session token.

    • durationInMinutes (integer) --

      Returns the duration in which the credentials will remain valid.

Exceptions

  • FinSpaceData.Client.exceptions.InternalServerException
  • FinSpaceData.Client.exceptions.ThrottlingException
  • FinSpaceData.Client.exceptions.AccessDeniedException
get_waiter(waiter_name)

Returns an object that can wait for some condition.

Parameters
waiter_name (str) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters.
Returns
The specified waiter object.
Return type
botocore.waiter.Waiter
get_working_location(**kwargs)

A temporary Amazon S3 location to copy your files from a source location to stage or use as a scratch space in Habanero notebook.

See also: AWS API Documentation

Request Syntax

response = client.get_working_location(
    locationType='INGESTION'|'SAGEMAKER'
)
Parameters
locationType (string) --

Specify the type of the working location.

  • SAGEMAKER - Use the Amazon S3 location as a temporary location to store data content when working with FinSpace Notebooks that run on SageMaker studio.
  • INGESTION - Use the Amazon S3 location as a staging location to copy your data content and then use the location with the changeset creation operation.
Return type
dict
Returns
Response Syntax
{
    's3Uri': 'string',
    's3Path': 'string',
    's3Bucket': 'string'
}

Response Structure

  • (dict) --
    • s3Uri (string) --

      Returns the Amazon S3 URI for the working location.

    • s3Path (string) --

      Returns the Amazon S3 Path for the working location.

    • s3Bucket (string) --

      Returns the Amazon S3 bucket name for the working location.

Exceptions

  • FinSpaceData.Client.exceptions.InternalServerException
  • FinSpaceData.Client.exceptions.AccessDeniedException
  • FinSpaceData.Client.exceptions.ThrottlingException
  • FinSpaceData.Client.exceptions.ValidationException

Paginators

The available paginators are: