Skip to content

AthenaClient.import_notebook

rboto-athena==0.4.0 · Service index · Types

Model summary (excerpt): Imports a single ipynb file to a Spark enabled workgroup. To import the notebook, the request must specify a value for either Payload or NoteBookS3LocationUri . If neither is specified or both are specified, an InvalidRequestException occurs. The maximum file size that can be imported is 10 megabytes. If an ipynb file with the same name already exists in the workgroup, throws an error.

Install and imports

python -m pip install "rboto[athena]==0.4.0"
from rboto import AthenaClient
from rboto_athena.types import (
    ImportNotebookOutput,
    NotebookType,
)

Signature

async def import_notebook(
    *,
    work_group: str,
    name: str,
    type: NotebookType,
    payload: str | None = None,
    notebook_s3_location_uri: str | None = None,
    client_request_token: str | None = None,
) -> ImportNotebookOutput: ...

Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.

Arguments

Argument Required Model notes (excerpt)
work_group Yes The name of the Spark enabled workgroup to import the notebook to.
name Yes The name of the notebook to import.
type Yes The notebook content type. Currently, the only valid type is IPYNB .
payload No The notebook content to be imported. The payload must be in ipynb format.
notebook_s3_location_uri No A URI that specifies the Amazon S3 location of a notebook file in ipynb format.
client_request_token No A unique case-sensitive string used to ensure the request to import the notebook is idempotent (executes only once). This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK for Java) auto-generate the token for you. If you are not using the Amazon Web Services SDK or the Amazon Web Services CLI, you must provide this token or the action...

Output

ImportNotebookOutput.

Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.

Field Type Presence References
notebook_id str | None Always present —

| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.

ImportNotebookOutput, NotebookType

Follow these links for nested inputs and outputs; recursive types link back to the same type page.

Pagination and streaming

No generated paginator for this operation.

No output stream.

Errors

Import from rboto_athena.exceptions:

InternalServerError, InvalidRequestError, TooManyRequestsError.

Other service failures use the service base error; credential, transport and timeout failures use shared errors.

Service guide · Pinned model