【AWS】AWS Glue ~ 基本編 / ジョブ ~

■ はじめに

https://dk521123.hatenablog.com/entry/2019/10/01/221926

の続き。

今回は、ジョブ(Job)について、焦点を当てる

目次

【1】ジョブ(Job)
【2】ジョブタイプ
 1)Spark
 2)Python shell
 3)Spark Streaming
【3】ジョブプロパティ
【4】Boto3 API

【1】ジョブ(Job)

* 1つのタスク(処理)を記述

【2】ジョブタイプ

AWS Glue の ジョブは、以下の3種類。
 1)Spark
 2)Python shell
 3)Spark Streaming !! New !!

1)Spark

* AWS Glue の ETL 作業を実行するビジネスロジック
 大規模処理向き

2)Python shell

* Python スクリプトをシェルとして実行
 => 詳細は、以下の関連記事を参照のこと。

https://dk521123.hatenablog.com/entry/2022/09/08/120231

使い分け(違いについて)

* ジョブタイプ「Spark」の場合、
  Python以外の言語で書かれた拡張機能(pandas など)はサポート外
 ⇒ Glue 2.0 以降では、サポートされている
 ⇒ Glue 2.0~ については、以下の関連記事を参照のこと

https://dk521123.hatenablog.com/entry/2020/08/19/130118
https://dk521123.hatenablog.com/entry/2021/09/18/232556
https://dk521123.hatenablog.com/entry/2023/03/15/000000

Glue バージョン Spark Python2 Python3 備考
0.9 Spark 2.2.1 Python 2.7 - -
1.0 Spark 2.4.3 Python 2.7 Python 3.6 -
2.0 Spark 2.4.3 - Python 3.7 -
3.0 Spark 3.1.1 - Python 3.7 -
4.0 Spark 3.3.0 - Python 3.10 -

ジョブタイプ「Spark」の場合
https://docs.aws.amazon.com/ja_jp/glue/latest/dg/aws-glue-programming-python-libraries.html

より抜粋
~~~~~~~~
pandas などの C ライブラリは現在のところサポート外です。
他の言語で書かれた拡張機能も同様です。
~~~~~~~~
 ⇒ Glue 2.0 では、サポートされている

3)Spark Streaming

いつの間にか新しいタイプのJobがでていた。。。

https://aws.amazon.com/jp/blogs/news/new-serverless-streaming-etl-with-aws-glue/

【3】ジョブプロパティ

* パフォーマンスに関わるジョブプロパティについては、以下の関連記事を参照のこと

AWS Glue ~ パフォーマンスチューニング ~
https://dk521123.hatenablog.com/entry/2022/12/03/000119

【4】Boto3 API

* Boto3 API については、以下の関連記事を参照のこと。

https://dk521123.hatenablog.com/entry/2019/10/14/000000

公式サイト

https://docs.aws.amazon.com/ja_jp/glue/latest/dg/aws-glue-api-jobs-job.html
データ構造
https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/aws-resource-glue-job.html

■ 関連記事

AWS Glue ~ 入門編 ~
https://dk521123.hatenablog.com/entry/2019/10/01/221926
AWS Glue ~ 基本編 /トリガ ~
https://dk521123.hatenablog.com/entry/2019/11/29/221207
AWS Glue ~ 基本編 / クローラ ~
https://dk521123.hatenablog.com/entry/2019/12/01/003455
AWS Glue ~ Workflows / Boto3・AWS CLI
https://dk521123.hatenablog.com/entry/2019/10/14/000000
AWS Glue ~ Workflows / パラメータ渡し ~
https://dk521123.hatenablog.com/entry/2019/10/15/221931
AWS Glue ~ Scalaでの実装 ~
https://dk521123.hatenablog.com/entry/2023/03/13/210831
AWS Glue ~ ジョブパラメータ ~
https://dk521123.hatenablog.com/entry/2022/09/28/105558
AWS Glue ~ パフォーマンスチューニング ~
https://dk521123.hatenablog.com/entry/2022/12/03/000119
AWS Glue ~ Python shell job ~
https://dk521123.hatenablog.com/entry/2022/09/08/120231
AWS Glue ~ Glue Version 2.0 ~
https://dk521123.hatenablog.com/entry/2020/08/19/130118
AWS Glue ~ Glue Version 3.0 ~
https://dk521123.hatenablog.com/entry/2021/09/18/232556
AWS Glue ~ Glue Version 4.0 ~
https://dk521123.hatenablog.com/entry/2023/03/15/000000
Glue から Redshift/PostgreSQL に接続する ~ Python shell編 ~
https://dk521123.hatenablog.com/entry/2020/08/26/193237
Glue から Redshift/PostgreSQL に接続する ~ PySpark編 ~
https://dk521123.hatenablog.com/entry/2020/09/23/111741
Glue から DataCatalogテーブル に対して Spark SQLを実行する
https://dk521123.hatenablog.com/entry/2021/05/11/220731
AWS Glue ~ DynamicFrame ~
https://dk521123.hatenablog.com/entry/2021/12/14/221043