create_session
¶
create_session(
id: NameString,
role: OrchestrationRoleArn,
command: SessionCommand,
*,
config_overrides: Optional[GlueClientConfig] = None,
description: Optional[DescriptionString] = None,
timeout: Optional[Timeout] = None,
idle_timeout: Optional[Timeout] = None,
default_arguments: Optional[OrchestrationArgumentsMap] = None,
connections: Optional[ConnectionsList] = None,
max_capacity: Optional[NullableDouble] = None,
number_of_workers: Optional[NullableInteger] = None,
worker_type: Optional[WorkerType] = None,
security_configuration: Optional[NameString] = None,
glue_version: Optional[GlueVersionString] = None,
tags: Optional[TagsMap] = None,
request_origin: Optional[OrchestrationNameString] = None,
session_type: Optional[SessionType] = None,
) -> CreateSessionResponse
Creates a new session.
Parameters:
-
id(NameString) –The ID of the session request.
-
description(Optional[DescriptionString], default:None) –The description of the session.
-
role(OrchestrationRoleArn) –The IAM Role ARN
-
command(SessionCommand) –The
SessionCommandthat runs the job. -
timeout(Optional[Timeout], default:None) –The number of minutes before session times out. Default for Spark ETL jobs is 48 hours (2880 minutes). Consult the documentation for other job types.
-
idle_timeout(Optional[Timeout], default:None) –The number of minutes when idle before session times out. Default for Spark ETL jobs is value of Timeout. Consult the documentation for other job types.
-
default_arguments(Optional[OrchestrationArgumentsMap], default:None) –A map array of key-value pairs. Max is 75 pairs.
-
connections(Optional[ConnectionsList], default:None) –The number of connections to use for the session.
-
max_capacity(Optional[NullableDouble], default:None) –The number of Glue data processing units (DPUs) that can be allocated when the job runs. A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB memory.
-
number_of_workers(Optional[NullableInteger], default:None) –The number of workers of a defined
WorkerTypeto use for the session. -
worker_type(Optional[WorkerType], default:None) –The type of predefined worker that is allocated when a job runs. Accepts a value of G.1X, G.2X, G.4X, or G.8X for Spark jobs. Accepts the value Z.2X for Ray notebooks.
-
For the
G.1Xworker type, each worker maps to 1 DPU (4 vCPUs, 16 GB of memory) with 94GB disk, and provides 1 executor per worker. We recommend this worker type for workloads such as data transforms, joins, and queries, to offers a scalable and cost effective way to run most jobs. -
For the
G.2Xworker type, each worker maps to 2 DPU (8 vCPUs, 32 GB of memory) with 138GB disk, and provides 1 executor per worker. We recommend this worker type for workloads such as data transforms, joins, and queries, to offers a scalable and cost effective way to run most jobs. -
For the
G.4Xworker type, each worker maps to 4 DPU (16 vCPUs, 64 GB of memory) with 256GB disk, and provides 1 executor per worker. We recommend this worker type for jobs whose workloads contain your most demanding transforms, aggregations, joins, and queries. This worker type is available only for Glue version 3.0 or later Spark ETL jobs in the following Amazon Web Services Regions: US East (Ohio), US East (N. Virginia), US West (Oregon), Asia Pacific (Singapore), Asia Pacific (Sydney), Asia Pacific (Tokyo), Canada (Central), Europe (Frankfurt), Europe (Ireland), and Europe (Stockholm). -
For the
G.8Xworker type, each worker maps to 8 DPU (32 vCPUs, 128 GB of memory) with 512GB disk, and provides 1 executor per worker. We recommend this worker type for jobs whose workloads contain your most demanding transforms, aggregations, joins, and queries. This worker type is available only for Glue version 3.0 or later Spark ETL jobs, in the same Amazon Web Services Regions as supported for theG.4Xworker type. -
For the
Z.2Xworker type, each worker maps to 2 M-DPU (8vCPUs, 64 GB of memory) with 128 GB disk, and provides up to 8 Ray workers based on the autoscaler.
-
-
security_configuration(Optional[NameString], default:None) –The name of the SecurityConfiguration structure to be used with the session
-
glue_version(Optional[GlueVersionString], default:None) –The Glue version determines the versions of Apache Spark and Python that Glue supports. The GlueVersion must be greater than 2.0.
-
tags(Optional[TagsMap], default:None) –The map of key value pairs (tags) belonging to the session.
-
request_origin(Optional[OrchestrationNameString], default:None) –The origin of the request.
-
session_type(Optional[SessionType], default:None) –The type of session to create.
Raises:
-
AccessDeniedException–Access to a resource was denied.
-
AlreadyExistsException–A resource to be created or added already exists.
-
IdempotentParameterMismatchException–The same unique identifier was associated with two different records.
-
InternalServiceException–An internal service error occurred.
-
InvalidInputException–The input provided was not valid.
-
OperationNotSupportedException–The operation is not available in the region.
-
OperationTimeoutException–The operation timed out.
-
ResourceNumberLimitExceededException–A resource numerical limit was exceeded.
-
ValidationException–A value could not be validated.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_glue/_services/glue.py
4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 | |