Skip to main content

notebooks

Creates, updates, deletes, gets or lists a notebooks resource.

Overview

Namenotebooks
TypeResource
Idaws.athena.notebooks

Fields

The following fields are returned by SELECT queries:

SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
create_notebookinsertregion, WorkGroup, NameCreates an empty ipynb file in the specified Apache Spark enabled workgroup. Throws an error if a file in the workgroup with the same name already exists.
update_notebookupdateregion, NotebookId, Payload, TypeUpdates the contents of a Spark notebook.
delete_notebookdeleteregionDeletes the specified notebook.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

INSERT examples

Creates an empty ipynb file in the specified Apache Spark enabled workgroup. Throws an error if a file in the workgroup with the same name already exists.

INSERT INTO aws.athena.notebooks (
WorkGroup,
Name,
ClientRequestToken,
region
)
SELECT
'{{ WorkGroup }}' /* required */,
'{{ Name }}' /* required */,
'{{ ClientRequestToken }}',
'{{ region }}'
RETURNING
notebook_id
;

UPDATE examples

Updates the contents of a Spark notebook.

UPDATE aws.athena.notebooks
SET
NotebookId = '{{ NotebookId }}',
Payload = '{{ Payload }}',
Type = '{{ Type }}',
SessionId = '{{ SessionId }}',
ClientRequestToken = '{{ ClientRequestToken }}'
WHERE
region = '{{ region }}' --required
AND NotebookId = '{{ NotebookId }}' --required
AND Payload = '{{ Payload }}' --required
AND Type = '{{ Type }}' --required;

DELETE examples

Deletes the specified notebook.

DELETE FROM aws.athena.notebooks
WHERE region = '{{ region }}' --required
;