Glue / Client / get_plan
get_plan#
- Glue.Client.get_plan(**kwargs)#
Gets code to perform a specified mapping.
See also: AWS API Documentation
Request Syntax
response = client.get_plan( Mapping=[ { 'SourceTable': 'string', 'SourcePath': 'string', 'SourceType': 'string', 'TargetTable': 'string', 'TargetPath': 'string', 'TargetType': 'string' }, ], Source={ 'DatabaseName': 'string', 'TableName': 'string' }, Sinks=[ { 'DatabaseName': 'string', 'TableName': 'string' }, ], Location={ 'Jdbc': [ { 'Name': 'string', 'Value': 'string', 'Param': True|False }, ], 'S3': [ { 'Name': 'string', 'Value': 'string', 'Param': True|False }, ], 'DynamoDB': [ { 'Name': 'string', 'Value': 'string', 'Param': True|False }, ] }, Language='PYTHON'|'SCALA', AdditionalPlanOptionsMap={ 'string': 'string' } )
- Parameters:
Mapping (list) –
[REQUIRED]
The list of mappings from a source table to target tables.
(dict) –
Defines a mapping.
SourceTable (string) –
The name of the source table.
SourcePath (string) –
The source path.
SourceType (string) –
The source type.
TargetTable (string) –
The target table.
TargetPath (string) –
The target path.
TargetType (string) –
The target type.
Source (dict) –
[REQUIRED]
The source table.
DatabaseName (string) – [REQUIRED]
The database in which the table metadata resides.
TableName (string) – [REQUIRED]
The name of the table in question.
Sinks (list) –
The target tables.
(dict) –
Specifies a table definition in the Glue Data Catalog.
DatabaseName (string) – [REQUIRED]
The database in which the table metadata resides.
TableName (string) – [REQUIRED]
The name of the table in question.
Location (dict) –
The parameters for the mapping.
Jdbc (list) –
A JDBC location.
(dict) –
An argument or property of a node.
Name (string) – [REQUIRED]
The name of the argument or property.
Value (string) – [REQUIRED]
The value of the argument or property.
Param (boolean) –
True if the value is used as a parameter.
S3 (list) –
An Amazon Simple Storage Service (Amazon S3) location.
(dict) –
An argument or property of a node.
Name (string) – [REQUIRED]
The name of the argument or property.
Value (string) – [REQUIRED]
The value of the argument or property.
Param (boolean) –
True if the value is used as a parameter.
DynamoDB (list) –
An Amazon DynamoDB table location.
(dict) –
An argument or property of a node.
Name (string) – [REQUIRED]
The name of the argument or property.
Value (string) – [REQUIRED]
The value of the argument or property.
Param (boolean) –
True if the value is used as a parameter.
Language (string) – The programming language of the code to perform the mapping.
AdditionalPlanOptionsMap (dict) –
A map to hold additional optional key-value parameters.
Currently, these key-value pairs are supported:
inferSchema
— Specifies whether to setinferSchema
to true or false for the default script generated by an Glue job. For example, to setinferSchema
to true, pass the following key value pair:--additional-plan-options-map '{"inferSchema":"true"}'
(string) –
(string) –
- Return type:
dict
- Returns:
Response Syntax
{ 'PythonScript': 'string', 'ScalaCode': 'string' }
Response Structure
(dict) –
PythonScript (string) –
A Python script to perform the mapping.
ScalaCode (string) –
The Scala code to perform the mapping.
Exceptions
Glue.Client.exceptions.InvalidInputException
Glue.Client.exceptions.InternalServiceException
Glue.Client.exceptions.OperationTimeoutException