Providing your own custom scripts
Scripts perform the extract, transform, and load (ETL) work in Amazon Glue. A script is created when you automatically generate the source code logic for a job. You can either edit this generated script, or you can provide your own custom script.
To provide your own custom script in Amazon Glue, follow these general steps:
-
Sign in to the Amazon Web Services Management Console and open the Amazon Glue console at https://console.amazonaws.cn/glue/
. -
Choose the ETL Jobs tab, and then view the Create job section. Choose a script editor option.
-
Under This job runs, choose one of the following:
Create a new script with boilerplate code
-
Upload and edit an existing script
-
On the Job details page, choose the IAM role that is required for your custom script to run. For more information, see Identity and access management for Amazon Glue.
Choose any connections that your script references. These objects are needed to connect to the necessary JDBC data stores.
An elastic network interface is a virtual network interface that you can attach to an instance in a virtual private cloud (VPC). Choose the elastic network interface that is required to connect to the data store that's used in the script.
-
Provide additional configuration, including parameters, specific to your job type. For more information about configuration for your job type, see the Building visual ETL jobs with Amazon Glue Studio section.
-
On the Script tab, paste or write your custom script.
Use the content in this section to guide the process of writing your custom script.
For more information about adding jobs in Amazon Glue, see Building visual ETL jobs with Amazon Glue Studio.
For step-by-step guidance, see the Add job tutorial in the Amazon Glue console.