AWSGlueDataplanePython 5.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- awsglue/README.md +37 -0
- awsglue/__init__.py +15 -0
- awsglue/context.py +690 -0
- awsglue/data_sink.py +49 -0
- awsglue/data_source.py +49 -0
- awsglue/dataframe_transforms/__init__.py +17 -0
- awsglue/dataframe_transforms/apply_mapping.py +76 -0
- awsglue/dataframereader.py +41 -0
- awsglue/dataframewriter.py +21 -0
- awsglue/devutils.py +236 -0
- awsglue/dynamicframe.py +669 -0
- awsglue/functions.py +31 -0
- awsglue/glue_shell.py +38 -0
- awsglue/gluetypes.py +461 -0
- awsglue/job.py +59 -0
- awsglue/scripts/__init__.py +12 -0
- awsglue/scripts/activate_etl_connector.py +362 -0
- awsglue/scripts/connector_activation_util.py +38 -0
- awsglue/scripts/crawler_redo_from_backup.py +75 -0
- awsglue/scripts/crawler_undo.py +121 -0
- awsglue/scripts/scripts_utils.py +106 -0
- awsglue/streaming_data_source.py +28 -0
- awsglue/transforms/__init__.py +47 -0
- awsglue/transforms/apply_mapping.py +72 -0
- awsglue/transforms/coalesce.py +66 -0
- awsglue/transforms/collection_transforms.py +155 -0
- awsglue/transforms/drop_nulls.py +85 -0
- awsglue/transforms/dynamicframe_filter.py +66 -0
- awsglue/transforms/dynamicframe_map.py +72 -0
- awsglue/transforms/errors_as_dynamicframe.py +45 -0
- awsglue/transforms/field_transforms.py +469 -0
- awsglue/transforms/relationalize.py +105 -0
- awsglue/transforms/repartition.py +61 -0
- awsglue/transforms/resolve_choice.py +85 -0
- awsglue/transforms/transform.py +92 -0
- awsglue/transforms/unbox.py +112 -0
- awsglue/transforms/union.py +66 -0
- awsglue/transforms/unnest_frame.py +75 -0
- awsglue/utils.py +159 -0
- awsgluedataplanepython-5.0.0.dist-info/METADATA +178 -0
- awsgluedataplanepython-5.0.0.dist-info/RECORD +45 -0
- awsgluedataplanepython-5.0.0.dist-info/WHEEL +5 -0
- awsgluedataplanepython-5.0.0.dist-info/licenses/LICENSE.txt +96 -0
- awsgluedataplanepython-5.0.0.dist-info/licenses/NOTICE.txt +3 -0
- awsgluedataplanepython-5.0.0.dist-info/top_level.txt +1 -0
awsglue/utils.py
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# Copyright 2016-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
# Licensed under the Amazon Software License (the "License"). You may not use
|
|
3
|
+
# this file except in compliance with the License. A copy of the License is
|
|
4
|
+
# located at
|
|
5
|
+
#
|
|
6
|
+
# http://aws.amazon.com/asl/
|
|
7
|
+
#
|
|
8
|
+
# or in the "license" file accompanying this file. This file is distributed
|
|
9
|
+
# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express
|
|
10
|
+
# or implied. See the License for the specific language governing
|
|
11
|
+
# permissions and limitations under the License.
|
|
12
|
+
|
|
13
|
+
import argparse
|
|
14
|
+
import json
|
|
15
|
+
import traceback
|
|
16
|
+
import sys
|
|
17
|
+
from awsglue.job import Job
|
|
18
|
+
|
|
19
|
+
_global_args = {}
|
|
20
|
+
|
|
21
|
+
def makeOptions(sc, py_obj):
|
|
22
|
+
if isinstance(py_obj, dict):
|
|
23
|
+
json_string = json.dumps(py_obj)
|
|
24
|
+
elif isinstance(py_obj, basestring):
|
|
25
|
+
json_string = py_obj
|
|
26
|
+
else:
|
|
27
|
+
raise TypeError("Unexpected type " + str(type(py_obj))
|
|
28
|
+
+ " in makeOptions")
|
|
29
|
+
return sc._jvm.JsonOptions(json_string)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def _call_site(sc, call_site, info):
|
|
33
|
+
return sc._jvm.CallSite(call_site, info)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def _as_java_list(sc, scala_seq_obj):
|
|
37
|
+
return sc._jvm.GluePythonUtils.seqAsJava(scala_seq_obj)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def _as_scala_option(sc, some_val):
|
|
41
|
+
return sc._jvm.GluePythonUtils.constructOption(some_val)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def _as_resolve_choiceOption(sc, choice_option_str):
|
|
45
|
+
return sc._jvm.GluePythonUtils.constructChoiceOption(choice_option_str)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def callsite():
|
|
49
|
+
return "".join(traceback.format_list(traceback.extract_stack()[:-2]))
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
# Definitions for Python 2/Python 3
|
|
53
|
+
if sys.version >= "3":
|
|
54
|
+
def iteritems(d, **kwargs):
|
|
55
|
+
return iter(d.items(**kwargs))
|
|
56
|
+
def iterkeys(d, **kwargs):
|
|
57
|
+
return iter(d.values(**kwargs))
|
|
58
|
+
def itervalues(d, **kwargs):
|
|
59
|
+
return iter(d.values(**kwargs))
|
|
60
|
+
else:
|
|
61
|
+
def iteritems(d, **kwargs):
|
|
62
|
+
return d.iteritems(**kwargs)
|
|
63
|
+
def iterkeys(d, **kwargs):
|
|
64
|
+
return d.iterkeys(**kwargs)
|
|
65
|
+
def itervalues(d, **kwargs):
|
|
66
|
+
return d.itervalues(**kwargs)
|
|
67
|
+
|
|
68
|
+
class GlueArgumentError(Exception):
|
|
69
|
+
pass
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
# Define a custom argument parser that raises an exception rather than calling
|
|
73
|
+
# sys.exit() so that we can surface the errors.
|
|
74
|
+
class GlueArgumentParser(argparse.ArgumentParser):
|
|
75
|
+
def error(self, msg):
|
|
76
|
+
raise GlueArgumentError(msg)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def getResolvedOptions(args, options):
|
|
80
|
+
parser = GlueArgumentParser()
|
|
81
|
+
|
|
82
|
+
if Job.continuation_options()[0][2:] in options:
|
|
83
|
+
raise RuntimeError("Using reserved arguments " + Job.continuation_options()[0][2:])
|
|
84
|
+
|
|
85
|
+
if Job.job_bookmark_options()[0][2:] in options:
|
|
86
|
+
raise RuntimeError("Using reserved arguments " + Job.job_bookmark_options()[0][2:])
|
|
87
|
+
|
|
88
|
+
parser.add_argument(Job.job_bookmark_options()[0], choices =Job.job_bookmark_options()[1:], required = False)
|
|
89
|
+
parser.add_argument(Job.continuation_options()[0], choices =Job.continuation_options()[1:], required = False)
|
|
90
|
+
|
|
91
|
+
for option in Job.job_bookmark_range_options():
|
|
92
|
+
if option[2:] in options:
|
|
93
|
+
raise RuntimeError("Using reserved arguments " + option)
|
|
94
|
+
parser.add_argument(option, required=False)
|
|
95
|
+
|
|
96
|
+
for option in Job.id_params()[1:]:
|
|
97
|
+
if option in options:
|
|
98
|
+
raise RuntimeError("Using reserved arguments " + option)
|
|
99
|
+
# TODO: Make these mandatory, for now for backward compatability making these optional, also not including JOB_NAME in the reserved parameters list.
|
|
100
|
+
parser.add_argument(option, required=False)
|
|
101
|
+
|
|
102
|
+
if Job.encryption_type_options()[0] in options:
|
|
103
|
+
raise RuntimeError("Using reserved arguments " + Job.encryption_type_options()[0])
|
|
104
|
+
parser.add_argument(Job.encryption_type_options()[0], choices = Job.encryption_type_options()[1:])
|
|
105
|
+
|
|
106
|
+
if Job.data_lineage_options()[0] in options:
|
|
107
|
+
raise RuntimeError("Using reserved arguments " + Job.data_lineage_options()[0])
|
|
108
|
+
parser.add_argument(Job.data_lineage_options()[0], required=False)
|
|
109
|
+
|
|
110
|
+
# TODO: Remove special handling for 'RedshiftTempDir' and 'TempDir' after TempDir is made mandatory for all Jobs
|
|
111
|
+
# Remove 'RedshiftTempDir' and 'TempDir' from list of user supplied options
|
|
112
|
+
options = [opt for opt in options if opt not in {'RedshiftTempDir', 'TempDir'}]
|
|
113
|
+
parser.add_argument('--RedshiftTempDir', required=False)
|
|
114
|
+
parser.add_argument('--TempDir', required=False)
|
|
115
|
+
|
|
116
|
+
for option in options:
|
|
117
|
+
parser.add_argument('--' + option, required=True)
|
|
118
|
+
|
|
119
|
+
parsed, extra = parser.parse_known_args(args[1:])
|
|
120
|
+
|
|
121
|
+
parsed_dict = vars(parsed)
|
|
122
|
+
|
|
123
|
+
# TODO: remove special handling after TempDir is made mandatory for all jobs
|
|
124
|
+
if 'TempDir' in parsed_dict and parsed_dict['TempDir'] is not None:
|
|
125
|
+
# TODO: Remove special handling for 'RedshiftTempDir' and 'TempDir'
|
|
126
|
+
parsed_dict['RedshiftTempDir'] = parsed_dict['TempDir']
|
|
127
|
+
elif 'RedshiftTempDir' in parsed and parsed_dict['RedshiftTempDir'] is not None:
|
|
128
|
+
parsed_dict['TempDir'] = parsed_dict['RedshiftTempDir']
|
|
129
|
+
|
|
130
|
+
# Special handling for continuations. If --job-bookmark-option is set we
|
|
131
|
+
# use that, regardless of whether --continuation-option is set. If
|
|
132
|
+
# --job-bookmark-option is not set but --continuation-option is set, fall
|
|
133
|
+
# back to that.
|
|
134
|
+
|
|
135
|
+
bookmark_value = parsed_dict.pop("continuation_option", None)
|
|
136
|
+
if 'job_bookmark_option' not in parsed_dict or parsed_dict['job_bookmark_option'] is None:
|
|
137
|
+
if bookmark_value is None:
|
|
138
|
+
bookmark_value = Job.job_bookmark_options()[3]
|
|
139
|
+
else:
|
|
140
|
+
# translate old style continuation options into job-bookmark options
|
|
141
|
+
option_index = Job.continuation_options().index(bookmark_value)
|
|
142
|
+
bookmark_value = Job.job_bookmark_options()[option_index]
|
|
143
|
+
|
|
144
|
+
parsed_dict['job_bookmark_option'] = bookmark_value
|
|
145
|
+
absent_range_option = []
|
|
146
|
+
for option in Job.job_bookmark_range_options():
|
|
147
|
+
key = option[2:].replace('-','_')
|
|
148
|
+
if key not in parsed_dict or parsed_dict[key] is None:
|
|
149
|
+
absent_range_option.append(option)
|
|
150
|
+
if parsed_dict['job_bookmark_option'] == 'job-bookmark-pause':
|
|
151
|
+
if len(absent_range_option) == 1:
|
|
152
|
+
raise RuntimeError("Missing option or value for " + absent_range_option[0])
|
|
153
|
+
else:
|
|
154
|
+
if len(absent_range_option) == 0:
|
|
155
|
+
raise RuntimeError("Invalid option(s)" + ' '.join(Job.job_bookmark_range_options()))
|
|
156
|
+
|
|
157
|
+
_global_args.update(parsed_dict)
|
|
158
|
+
|
|
159
|
+
return parsed_dict
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: AWSGlueDataplanePython
|
|
3
|
+
Version: 5.0.0
|
|
4
|
+
Summary: AWS Glue Python library for local ETL script development
|
|
5
|
+
License: Amazon Software License 1.0
|
|
6
|
+
|
|
7
|
+
This Amazon Software License ("License") governs your use, reproduction, and
|
|
8
|
+
distribution of the accompanying software as specified below.
|
|
9
|
+
|
|
10
|
+
1. Definitions
|
|
11
|
+
|
|
12
|
+
"Licensor" means any person or entity that distributes its Work.
|
|
13
|
+
|
|
14
|
+
"Software" means the original work of authorship made available under this
|
|
15
|
+
License.
|
|
16
|
+
|
|
17
|
+
"Work" means the Software and any additions to or derivative works of the
|
|
18
|
+
Software that are made available under this License.
|
|
19
|
+
|
|
20
|
+
The terms "reproduce," "reproduction," "derivative works," and
|
|
21
|
+
"distribution" have the meaning as provided under U.S. copyright law;
|
|
22
|
+
provided, however, that for the purposes of this License, derivative works
|
|
23
|
+
shall not include works that remain separable from, or merely link (or bind
|
|
24
|
+
by name) to the interfaces of, the Work.
|
|
25
|
+
|
|
26
|
+
Works, including the Software, are "made available" under this License by
|
|
27
|
+
including in or with the Work either (a) a copyright notice referencing the
|
|
28
|
+
applicability of this License to the Work, or (b) a copy of this License.
|
|
29
|
+
|
|
30
|
+
2. License Grants
|
|
31
|
+
|
|
32
|
+
2.1 Copyright Grant. Subject to the terms and conditions of this License,
|
|
33
|
+
each Licensor grants to you a perpetual, worldwide, non-exclusive,
|
|
34
|
+
royalty-free, copyright license to reproduce, prepare derivative works of,
|
|
35
|
+
publicly display, publicly perform, sublicense and distribute its Work and
|
|
36
|
+
any resulting derivative works in any form.
|
|
37
|
+
|
|
38
|
+
2.2 Patent Grant. Subject to the terms and conditions of this License, each
|
|
39
|
+
Licensor grants to you a perpetual, worldwide, non-exclusive, royalty-free
|
|
40
|
+
patent license to make, have made, use, sell, offer for sale, import, and
|
|
41
|
+
otherwise transfer its Work, in whole or in part. The foregoing license
|
|
42
|
+
applies only to the patent claims licensable by Licensor that would be
|
|
43
|
+
infringed by Licensor's Work (or portion thereof) individually and
|
|
44
|
+
excluding any combinations with any other materials or technology.
|
|
45
|
+
|
|
46
|
+
3. Limitations
|
|
47
|
+
|
|
48
|
+
3.1 Redistribution. You may reproduce or distribute the Work only if
|
|
49
|
+
(a) you do so under this License, (b) you include a complete copy of this
|
|
50
|
+
License with your distribution, and (c) you retain without modification
|
|
51
|
+
any copyright, patent, trademark, or attribution notices that are present
|
|
52
|
+
in the Work.
|
|
53
|
+
|
|
54
|
+
3.2 Derivative Works. You may specify that additional or different terms
|
|
55
|
+
apply to the use, reproduction, and distribution of your derivative works
|
|
56
|
+
of the Work ("Your Terms") only if (a) Your Terms provide that the use
|
|
57
|
+
limitation in Section 3.3 applies to your derivative works, and (b) you
|
|
58
|
+
identify the specific derivative works that are subject to Your Terms.
|
|
59
|
+
Notwithstanding Your Terms, this License (including the redistribution
|
|
60
|
+
requirements in Section 3.1) will continue to apply to the Work itself.
|
|
61
|
+
|
|
62
|
+
3.3 Use Limitation. The Work and any derivative works thereof only may be
|
|
63
|
+
used or intended for use with the web services, computing platforms or
|
|
64
|
+
applications provided by Amazon.com, Inc. or its affiliates, including
|
|
65
|
+
Amazon Web Services, Inc.
|
|
66
|
+
|
|
67
|
+
3.4 Patent Claims. If you bring or threaten to bring a patent claim against
|
|
68
|
+
any Licensor (including any claim, cross-claim or counterclaim in a
|
|
69
|
+
lawsuit) to enforce any patents that you allege are infringed by any Work,
|
|
70
|
+
then your rights under this License from such Licensor (including the
|
|
71
|
+
grants in Sections 2.1 and 2.2) will terminate immediately.
|
|
72
|
+
|
|
73
|
+
3.5 Trademarks. This License does not grant any rights to use any
|
|
74
|
+
Licensor's or its affiliates' names, logos, or trademarks, except as
|
|
75
|
+
necessary to reproduce the notices described in this License.
|
|
76
|
+
|
|
77
|
+
3.6 Termination. If you violate any term of this License, then your rights
|
|
78
|
+
under this License (including the grants in Sections 2.1 and 2.2) will
|
|
79
|
+
terminate immediately.
|
|
80
|
+
|
|
81
|
+
4. Disclaimer of Warranty.
|
|
82
|
+
|
|
83
|
+
THE WORK IS PROVIDED "AS IS" WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
|
84
|
+
EITHER EXPRESS OR IMPLIED, INCLUDING WARRANTIES OR CONDITIONS OF
|
|
85
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE OR
|
|
86
|
+
NON-INFRINGEMENT. YOU BEAR THE RISK OF UNDERTAKING ANY ACTIVITIES UNDER
|
|
87
|
+
THIS LICENSE. SOME STATES' CONSUMER LAWS DO NOT ALLOW EXCLUSION OF AN
|
|
88
|
+
IMPLIED WARRANTY, SO THIS DISCLAIMER MAY NOT APPLY TO YOU.
|
|
89
|
+
|
|
90
|
+
5. Limitation of Liability.
|
|
91
|
+
|
|
92
|
+
EXCEPT AS PROHIBITED BY APPLICABLE LAW, IN NO EVENT AND UNDER NO LEGAL
|
|
93
|
+
THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE
|
|
94
|
+
SHALL ANY LICENSOR BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT,
|
|
95
|
+
INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR
|
|
96
|
+
RELATED TO THIS LICENSE, THE USE OR INABILITY TO USE THE WORK (INCLUDING
|
|
97
|
+
BUT NOT LIMITED TO LOSS OF GOODWILL, BUSINESS INTERRUPTION, LOST PROFITS
|
|
98
|
+
OR DATA, COMPUTER FAILURE OR MALFUNCTION, OR ANY OTHER COMM ERCIAL DAMAGES
|
|
99
|
+
OR LOSSES), EVEN IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF
|
|
100
|
+
SUCH DAMAGES.
|
|
101
|
+
|
|
102
|
+
Requires-Python: <3.12,>=3.11
|
|
103
|
+
Description-Content-Type: text/markdown
|
|
104
|
+
License-File: LICENSE.txt
|
|
105
|
+
License-File: NOTICE.txt
|
|
106
|
+
Dynamic: license-file
|
|
107
|
+
|
|
108
|
+
# aws-glue-libs
|
|
109
|
+
|
|
110
|
+
This repository supports python libraries for local development of glue pyspark batch jobs. Glue streaming is supported in the separate repository [aws-glue-streaming-libs](https://github.com/awslabs/aws-glue-streaming-libs).
|
|
111
|
+
|
|
112
|
+
## Contents
|
|
113
|
+
This repository contains:
|
|
114
|
+
* `awsglue` - the Python libary you can use to author [AWS Glue](https://aws.amazon.com/glue) ETL job. This library extends [Apache Spark](https://spark.apache.org/) with additional data types and operations for ETL workflows. It's an interface for Glue ETL library in Python.
|
|
115
|
+
* `bin` - this directory hosts several executables that allow you to run the Python library locally or open up a PySpark shell to run Glue Spark code interactively.
|
|
116
|
+
|
|
117
|
+
## Python versions by Glue Version
|
|
118
|
+
|
|
119
|
+
Different Glue versions support different Python versions. The following table below is for your reference, which also includes the associated repository's branch for each glue version.
|
|
120
|
+
|
|
121
|
+
| Glue Version | Python 3 Version | aws-glue-libs branch |
|
|
122
|
+
|---|---|----------------------|
|
|
123
|
+
| 2.0 | 3.7 | glue-2.0 |
|
|
124
|
+
| 3.0 | 3.7 | glue-3.0 |
|
|
125
|
+
| 4.0 | 3.10 | glue-4.0 |
|
|
126
|
+
| 5.0 | 3.11 | glue-5.0 |
|
|
127
|
+
|
|
128
|
+
You may refer to AWS Glue's official [release notes](https://docs.aws.amazon.com/glue/latest/dg/release-notes.html) for more information
|
|
129
|
+
|
|
130
|
+
## Setup guide
|
|
131
|
+
|
|
132
|
+
If you haven't already, please refer to the [official AWS Glue Python local development documentation](https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-libraries.html#develop-local-python) for the official setup documentation. The following is a summary of the AWS documentation:
|
|
133
|
+
|
|
134
|
+
The `awsglue` library provides only the Python interface to the Glue Spark runtime, you need the Glue ETL jar to run it locally. The jar is now available via the maven build system in a s3 backed maven repository. Here are the steps to set up your dev environment locally.
|
|
135
|
+
|
|
136
|
+
1. install Apache Maven from the following location: https://aws-glue-etl-artifacts.s3.amazonaws.com/glue-common/apache-maven-3.6.0-bin.tar.gz
|
|
137
|
+
1. use `copy-dependencies` target in Apache Maven to download the jar from S3 to your local dev environment.
|
|
138
|
+
1. download and extract the Apache Spark distribution based on the Glue version you're using:
|
|
139
|
+
* Glue version 2.0: `https://aws-glue-etl-artifacts.s3.amazonaws.com/glue-2.0/spark-2.4.3-bin-hadoop2.8.tgz1`
|
|
140
|
+
* Glue version 3.0: `https://aws-glue-etl-artifacts.s3.amazonaws.com/glue-3.0/spark-3.1.1-amzn-0-bin-3.2.1-amzn-3.tgz`
|
|
141
|
+
* Glue version 4.0: `https://aws-glue-etl-artifacts.s3.amazonaws.com/glue-4.0/spark-3.3.0-amzn-1-bin-3.3.3-amzn-0.tgz`
|
|
142
|
+
* Glue version 5.0: download the Apache Spark 3.5.4 distribution from `https://spark.apache.org`
|
|
143
|
+
1. export the `SPARK_HOME` environmental variable to the extracted location of the above Spark distribution. For example:
|
|
144
|
+
```
|
|
145
|
+
Glue version 2.0: export SPARK_HOME=/home/$USER/spark-2.4.3-bin-hadoop2.8
|
|
146
|
+
Glue version 3.0: export SPARK_HOME=/home/$USER/spark-3.1.1-amzn-0-bin-3.2.1-amzn-3
|
|
147
|
+
Glue version 4.0: export SPARK_HOME=/home/$USER/spark-3.3.0-amzn-1-bin-3.3.3-amzn-0
|
|
148
|
+
Glue version 5.0: export SPARK_HOME=/home/$USER/spark-3.5.4-bin-hadoop3
|
|
149
|
+
```
|
|
150
|
+
1. now you can run the executables in the `bin` directory to start a Glue Shell or submit a Glue Spark application.
|
|
151
|
+
```
|
|
152
|
+
Glue shell: ./bin/gluepyspark
|
|
153
|
+
Glue submit: ./bin/gluesparksubmit
|
|
154
|
+
pytest: ./bin/gluepytest
|
|
155
|
+
```
|
|
156
|
+
(The `gluepytest` script assumes that the pytest module is installed and available in the `PATH` env variable)
|
|
157
|
+
|
|
158
|
+
## Licensing
|
|
159
|
+
|
|
160
|
+
The libraries in this repository licensed under the [Amazon Software License](http://aws.amazon.com/asl/) (the "License"). They may not be used except in compliance with the License, a copy of which is included here in the LICENSE file.
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
# Release Notes
|
|
165
|
+
|
|
166
|
+
## July 26 2023
|
|
167
|
+
* According to [AWS Glue version support policy](https://docs.aws.amazon.com/glue/latest/dg/glue-version-support-policy.html), branches for Glue 0.9 and 1.0 are removed as they are already deprecated.
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
## August 27 2021
|
|
171
|
+
* The master branch has been modified from representing Glue 0.9 to Glue 3.0, we have also created a glue-0.9 branch to reflect the former state of the master branch with Glue 0.9. To rename your local clone of the older master branch and point to the glue-0.9 branch, you may use the following commands:
|
|
172
|
+
```
|
|
173
|
+
git branch -m master glue-0.9
|
|
174
|
+
git fetch origin
|
|
175
|
+
git branch -u origin/glue-0.9 glue-0.9
|
|
176
|
+
git remote set-head origin -a
|
|
177
|
+
```
|
|
178
|
+
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
awsglue/README.md,sha256=gWvZmaUrDFQ9JmbJ3nBlA83jsX2ibBKiHLtyfJVLPzA,3052
|
|
2
|
+
awsglue/__init__.py,sha256=LKS4_qvvGBrhkn_ktHtG0hsCtDmyZRZsw2TOk0WlTSg,616
|
|
3
|
+
awsglue/context.py,sha256=f39C10IDud3s8RTvhctj9nBWb-qojX6Ope-_Jy-nACE,36954
|
|
4
|
+
awsglue/data_sink.py,sha256=6tXNLsFy4cGQyT3U_6Zkgf01V4Ai_cSVFs-THgSIxT0,2280
|
|
5
|
+
awsglue/data_source.py,sha256=1V68E6xVfcRIXmzc1V4I2YlRFK7AEhJeXG0Lk2ddTyw,1957
|
|
6
|
+
awsglue/dataframereader.py,sha256=WO3aFeP-ufVjpMNjuzRHTxy-qbJZvhwPuczHaJ5qV2g,2292
|
|
7
|
+
awsglue/dataframewriter.py,sha256=5DytlD1sZfNgNlXsLTjFLGZtVcaXq11WlCBQSJOB6YI,1124
|
|
8
|
+
awsglue/devutils.py,sha256=YlquGMbatq_zI2G_C0FSNiAJJVAINImPetkXjWtZU1o,9155
|
|
9
|
+
awsglue/dynamicframe.py,sha256=NGK2F_h4rcwHOQRLATB9xQNpu3wsEn-8xygYWdAtgs4,35382
|
|
10
|
+
awsglue/functions.py,sha256=aLzbH73Kei09MvjYk-Kbqpb1ZNmzaa95F__JxnGEoV4,1347
|
|
11
|
+
awsglue/glue_shell.py,sha256=M_5rohkaKKBKlbs7BTDhs6AHod1aBjXv-WB5uuRjifM,1312
|
|
12
|
+
awsglue/gluetypes.py,sha256=Fm71w7fuYzyk_rUtNw63ksSBjSoy92Dg1gQjRLtoSJE,14899
|
|
13
|
+
awsglue/job.py,sha256=AirBwmNeFQEZ8o3kMVfLpNa9rdu86DptKLlUBpw3Lxg,2533
|
|
14
|
+
awsglue/streaming_data_source.py,sha256=I0AeEKTIRcTN4lv5nGtghxnNCJYa8atzecJjgSjXz6E,1086
|
|
15
|
+
awsglue/utils.py,sha256=0yamMo9nPjm-A4VoPJi67SeJoIJS81QU5UGAWuj80bQ,6348
|
|
16
|
+
awsglue/dataframe_transforms/__init__.py,sha256=yVSCMHqRvbY44SeElCG2klw61uqzKJuYwD-GtRZxogU,686
|
|
17
|
+
awsglue/dataframe_transforms/apply_mapping.py,sha256=QEAjRVFxAlUehhTgrrrO_xuLPyOQhQEfnraciCd-ptA,2830
|
|
18
|
+
awsglue/scripts/__init__.py,sha256=8pgmHroSCEsoLCTyy_7PpbzrIe7OR4Di7EgwRkJKNak,549
|
|
19
|
+
awsglue/scripts/activate_etl_connector.py,sha256=1Y5o3S8iFgwErErssulavBIZxC1sCpls0zgYRKbYS28,15453
|
|
20
|
+
awsglue/scripts/connector_activation_util.py,sha256=TYwU0Ko7dkALcCqqhperPM7KVfBETea3hSx8C2XJS0g,1870
|
|
21
|
+
awsglue/scripts/crawler_redo_from_backup.py,sha256=RBSV4g1BybJjhz-yG_GAi-D6wohrd5eltB0BzQAqTjw,2975
|
|
22
|
+
awsglue/scripts/crawler_undo.py,sha256=xumzegGdk1Z5iwa2NJrRHMG_BoDJwz2TgznUHdpqL78,5824
|
|
23
|
+
awsglue/scripts/scripts_utils.py,sha256=xrIan9YtTksE_Z_0z-uMvU-C3Mj7a83jBE9bZFKoFp4,5176
|
|
24
|
+
awsglue/transforms/__init__.py,sha256=x7ASTLc_icvAiKqOGQFxD1cMx_UwBuGcJK4coUmHLxg,2075
|
|
25
|
+
awsglue/transforms/apply_mapping.py,sha256=U7LBpWISsMi-pw8W9PNDRnn3Gkw2qYAU1EnacBGofa4,3043
|
|
26
|
+
awsglue/transforms/coalesce.py,sha256=I7gAbeleqFaJZ4u95f2XWeJTwWv41-pcajRTCXk744s,2746
|
|
27
|
+
awsglue/transforms/collection_transforms.py,sha256=gTxWZ236iX8MgAguTNi03aqqwtUw3LFkrTjYaTr7rqM,5388
|
|
28
|
+
awsglue/transforms/drop_nulls.py,sha256=a1BeJVk2CWI1m5vrZy8Rr7vm0_UPondIKNGMOGHaGy4,3589
|
|
29
|
+
awsglue/transforms/dynamicframe_filter.py,sha256=1JqEKt07WnsP85jdmzfjV_KCWGe7CvSSGXu27QEBZEI,2840
|
|
30
|
+
awsglue/transforms/dynamicframe_map.py,sha256=_GgOopMRUiS-f-yqdNMy7bljYVazkUQw8wME2D2sKlA,3133
|
|
31
|
+
awsglue/transforms/errors_as_dynamicframe.py,sha256=32IDYM1m6KBUvN5N0qs3WcoZ9eqRwC9zYHhDt0XU-Zw,1566
|
|
32
|
+
awsglue/transforms/field_transforms.py,sha256=bPemQMHQyH0oa7cQddQMtdsuVpA989ZezqICu9QuvUY,19327
|
|
33
|
+
awsglue/transforms/relationalize.py,sha256=gZIXr4AMt6T216E6saveIg7WKEwqmWGWhAmGdUp837o,5103
|
|
34
|
+
awsglue/transforms/repartition.py,sha256=0v8CJqsmmGwSOMehKBGbHG4ABe7BjkKVJazicT33wWY,2478
|
|
35
|
+
awsglue/transforms/resolve_choice.py,sha256=-iZRpfly_xD1H6swwiqU5U1d8S59qHGMSmAYW6iWoo4,3680
|
|
36
|
+
awsglue/transforms/transform.py,sha256=aqYAFoSE-1gloqHiwSFGnBTrz_UqvOK_oxNWvHqex6E,3556
|
|
37
|
+
awsglue/transforms/unbox.py,sha256=nawjxGQ58HICIOuzjqgr9mdKBioDmN0Tfa6wE3qg0I8,5139
|
|
38
|
+
awsglue/transforms/union.py,sha256=ZyxRa5peaBHIRD706vHgqYK7sNeFgdJktnXQqGWQFYw,2660
|
|
39
|
+
awsglue/transforms/unnest_frame.py,sha256=JUSjkO0p_nrQehnz2bm36O16D4hxNAqsXw7DtVtmdUI,3248
|
|
40
|
+
awsgluedataplanepython-5.0.0.dist-info/licenses/LICENSE.txt,sha256=kfc3Oq6-hUnKrRXyvizP8poBHZGcqqqaP2OQswKNmxw,4845
|
|
41
|
+
awsgluedataplanepython-5.0.0.dist-info/licenses/NOTICE.txt,sha256=3CdypHIhrVJqQALnddEVgbDvKExKp92qfx_FNi6z7Ac,92
|
|
42
|
+
awsgluedataplanepython-5.0.0.dist-info/METADATA,sha256=QqJl56Z54WXR2FmNIALrMZQ4UNt7oI_ArKxA3AkZr-c,10387
|
|
43
|
+
awsgluedataplanepython-5.0.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
44
|
+
awsgluedataplanepython-5.0.0.dist-info/top_level.txt,sha256=nIKpLkaFeI_OdtcrIGaedAnX5ffCAAs2G67lpngWE28,8
|
|
45
|
+
awsgluedataplanepython-5.0.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
Amazon Software License 1.0
|
|
2
|
+
|
|
3
|
+
This Amazon Software License ("License") governs your use, reproduction, and
|
|
4
|
+
distribution of the accompanying software as specified below.
|
|
5
|
+
|
|
6
|
+
1. Definitions
|
|
7
|
+
|
|
8
|
+
"Licensor" means any person or entity that distributes its Work.
|
|
9
|
+
|
|
10
|
+
"Software" means the original work of authorship made available under this
|
|
11
|
+
License.
|
|
12
|
+
|
|
13
|
+
"Work" means the Software and any additions to or derivative works of the
|
|
14
|
+
Software that are made available under this License.
|
|
15
|
+
|
|
16
|
+
The terms "reproduce," "reproduction," "derivative works," and
|
|
17
|
+
"distribution" have the meaning as provided under U.S. copyright law;
|
|
18
|
+
provided, however, that for the purposes of this License, derivative works
|
|
19
|
+
shall not include works that remain separable from, or merely link (or bind
|
|
20
|
+
by name) to the interfaces of, the Work.
|
|
21
|
+
|
|
22
|
+
Works, including the Software, are "made available" under this License by
|
|
23
|
+
including in or with the Work either (a) a copyright notice referencing the
|
|
24
|
+
applicability of this License to the Work, or (b) a copy of this License.
|
|
25
|
+
|
|
26
|
+
2. License Grants
|
|
27
|
+
|
|
28
|
+
2.1 Copyright Grant. Subject to the terms and conditions of this License,
|
|
29
|
+
each Licensor grants to you a perpetual, worldwide, non-exclusive,
|
|
30
|
+
royalty-free, copyright license to reproduce, prepare derivative works of,
|
|
31
|
+
publicly display, publicly perform, sublicense and distribute its Work and
|
|
32
|
+
any resulting derivative works in any form.
|
|
33
|
+
|
|
34
|
+
2.2 Patent Grant. Subject to the terms and conditions of this License, each
|
|
35
|
+
Licensor grants to you a perpetual, worldwide, non-exclusive, royalty-free
|
|
36
|
+
patent license to make, have made, use, sell, offer for sale, import, and
|
|
37
|
+
otherwise transfer its Work, in whole or in part. The foregoing license
|
|
38
|
+
applies only to the patent claims licensable by Licensor that would be
|
|
39
|
+
infringed by Licensor's Work (or portion thereof) individually and
|
|
40
|
+
excluding any combinations with any other materials or technology.
|
|
41
|
+
|
|
42
|
+
3. Limitations
|
|
43
|
+
|
|
44
|
+
3.1 Redistribution. You may reproduce or distribute the Work only if
|
|
45
|
+
(a) you do so under this License, (b) you include a complete copy of this
|
|
46
|
+
License with your distribution, and (c) you retain without modification
|
|
47
|
+
any copyright, patent, trademark, or attribution notices that are present
|
|
48
|
+
in the Work.
|
|
49
|
+
|
|
50
|
+
3.2 Derivative Works. You may specify that additional or different terms
|
|
51
|
+
apply to the use, reproduction, and distribution of your derivative works
|
|
52
|
+
of the Work ("Your Terms") only if (a) Your Terms provide that the use
|
|
53
|
+
limitation in Section 3.3 applies to your derivative works, and (b) you
|
|
54
|
+
identify the specific derivative works that are subject to Your Terms.
|
|
55
|
+
Notwithstanding Your Terms, this License (including the redistribution
|
|
56
|
+
requirements in Section 3.1) will continue to apply to the Work itself.
|
|
57
|
+
|
|
58
|
+
3.3 Use Limitation. The Work and any derivative works thereof only may be
|
|
59
|
+
used or intended for use with the web services, computing platforms or
|
|
60
|
+
applications provided by Amazon.com, Inc. or its affiliates, including
|
|
61
|
+
Amazon Web Services, Inc.
|
|
62
|
+
|
|
63
|
+
3.4 Patent Claims. If you bring or threaten to bring a patent claim against
|
|
64
|
+
any Licensor (including any claim, cross-claim or counterclaim in a
|
|
65
|
+
lawsuit) to enforce any patents that you allege are infringed by any Work,
|
|
66
|
+
then your rights under this License from such Licensor (including the
|
|
67
|
+
grants in Sections 2.1 and 2.2) will terminate immediately.
|
|
68
|
+
|
|
69
|
+
3.5 Trademarks. This License does not grant any rights to use any
|
|
70
|
+
Licensor's or its affiliates' names, logos, or trademarks, except as
|
|
71
|
+
necessary to reproduce the notices described in this License.
|
|
72
|
+
|
|
73
|
+
3.6 Termination. If you violate any term of this License, then your rights
|
|
74
|
+
under this License (including the grants in Sections 2.1 and 2.2) will
|
|
75
|
+
terminate immediately.
|
|
76
|
+
|
|
77
|
+
4. Disclaimer of Warranty.
|
|
78
|
+
|
|
79
|
+
THE WORK IS PROVIDED "AS IS" WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
|
80
|
+
EITHER EXPRESS OR IMPLIED, INCLUDING WARRANTIES OR CONDITIONS OF
|
|
81
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE OR
|
|
82
|
+
NON-INFRINGEMENT. YOU BEAR THE RISK OF UNDERTAKING ANY ACTIVITIES UNDER
|
|
83
|
+
THIS LICENSE. SOME STATES' CONSUMER LAWS DO NOT ALLOW EXCLUSION OF AN
|
|
84
|
+
IMPLIED WARRANTY, SO THIS DISCLAIMER MAY NOT APPLY TO YOU.
|
|
85
|
+
|
|
86
|
+
5. Limitation of Liability.
|
|
87
|
+
|
|
88
|
+
EXCEPT AS PROHIBITED BY APPLICABLE LAW, IN NO EVENT AND UNDER NO LEGAL
|
|
89
|
+
THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE
|
|
90
|
+
SHALL ANY LICENSOR BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT,
|
|
91
|
+
INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR
|
|
92
|
+
RELATED TO THIS LICENSE, THE USE OR INABILITY TO USE THE WORK (INCLUDING
|
|
93
|
+
BUT NOT LIMITED TO LOSS OF GOODWILL, BUSINESS INTERRUPTION, LOST PROFITS
|
|
94
|
+
OR DATA, COMPUTER FAILURE OR MALFUNCTION, OR ANY OTHER COMM ERCIAL DAMAGES
|
|
95
|
+
OR LOSSES), EVEN IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF
|
|
96
|
+
SUCH DAMAGES.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
awsglue
|