notebooks
Creates, updates, deletes, gets or lists a notebooks resource.
Overview
| Name | notebooks |
| Type | Resource |
| Id | aws.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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
create_notebook | insert | region, WorkGroup, Name | 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. | |
update_notebook | update | region, NotebookId, Payload, Type | Updates the contents of a Spark notebook. | |
delete_notebook | delete | region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
INSERT examples
- create_notebook
- Manifest
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
;
# Description fields are for documentation purposes
- name: notebooks
props:
- name: region
value: "{{ region }}"
description: Required parameter for the notebooks resource.
- name: WorkGroup
value: "{{ WorkGroup }}"
description: |
The name of the Spark enabled workgroup in which the notebook will be created.
- name: Name
value: "{{ Name }}"
description: |
The name of the ipynb file to be created in the Spark workgroup, without the .ipynb extension.
- name: ClientRequestToken
value: "{{ ClientRequestToken }}"
description: |
A unique case-sensitive string used to ensure the request to create 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 will fail.
UPDATE examples
- update_notebook
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
- delete_notebook
Deletes the specified notebook.
DELETE FROM aws.athena.notebooks
WHERE region = '{{ region }}' --required
;