Skip to content

Commit

Permalink
AWS SNS Notify transform initial version. apache#3601
Browse files Browse the repository at this point in the history
  • Loading branch information
bamaer committed Feb 22, 2024
1 parent 1b30a40 commit 32d6a48
Show file tree
Hide file tree
Showing 14 changed files with 2,061 additions and 5 deletions.
10 changes: 8 additions & 2 deletions assemblies/plugins/tech/aws/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@

<properties>
<!-- Third-party dependencies -->
<aws-java-sdk-s3.version>1.12.279</aws-java-sdk-s3.version>
<aws-java-sdk-core.version>1.12.279</aws-java-sdk-core.version>
<aws-java-sdk-s3.version>1.12.651</aws-java-sdk-s3.version>
<aws-java-sdk-core.version>1.12.651</aws-java-sdk-core.version>
<aws-java-sdk-sns.version>1.12.651</aws-java-sdk-sns.version>
<redshift.jdbc.version>2.1.0.19</redshift.jdbc.version>

<!-- Test dependencies -->
Expand Down Expand Up @@ -73,6 +74,11 @@
<version>${aws-java-sdk-s3.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-sns</artifactId>
<version>${aws-java-sdk-sns.version}</version>
</dependency>
<dependency>
<groupId>com.amazon.redshift</groupId>
<artifactId>redshift-jdbc42</artifactId>
Expand Down
1 change: 1 addition & 0 deletions assemblies/plugins/tech/aws/src/assembly/assembly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
<include>com.fasterxml.jackson.dataformat:jackson-dataformat-cbor</include>
<include>joda-time:joda-time</include>
<include>com.amazonaws:aws-java-sdk-s3</include>
<include>com.amazonaws:aws-java-sdk-sns:jar</include>
<include>com.amazonaws:aws-java-sdk-kms</include>
<include>com.amazon.redshift:redshift-jdbc42:jar</include>
</includes>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/hop-user-manual/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ under the License.
*** xref:pipeline/transforms/avro-encode.adoc[Avro Encode]
*** xref:pipeline/transforms/avro-file-input.adoc[Avro File Input]
*** xref:pipeline/transforms/avro-file-output.adoc[Avro File Output]
*** xref:pipeline/transforms/aws-sns-notify.adoc[AWS SNS Notify]
*** xref:pipeline/transforms/azure-event-hubs-listener.adoc[Azure Event Hubs Listener]
*** xref:pipeline/transforms/azure-event-hubs-writer.adoc[Azure Event Hubs Writer]
*** xref:pipeline/transforms/beambigtableinput.adoc[Beam Bigtable Input]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ The pages nested under this topic contain information on how to use the transfor
* xref:pipeline/transforms/avro-decode.adoc[Avro Decode]
* xref:pipeline/transforms/avro-encode.adoc[Avro Encode]
* xref:pipeline/transforms/avro-file-input.adoc[Avro File Input]
* xref:pipeline/transforms/aws-sns-notify.adoc[AWS SNS Notify]
* xref:pipeline/transforms/azure-event-hubs-listener.adoc[Azure Event Hubs Listener]
* xref:pipeline/transforms/azure-event-hubs-writer.adoc[Azure Event Hubs Writer]
* xref:pipeline/transforms/beambigqueryinput.adoc[Beam BigQuery Input]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
////
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
////
:documentationPath: /pipeline/transforms/
:language: en_US
:description: The AWS SNS transform enables you to send Notifications from a pipeline via AWS Simple Notification Service to subscribed users.

= image:transforms/icons/aws-sns.svg[Notify via AWS SNS, role="image-doc-icon"] AWS SNS Notify

[%noheader,cols="3a,1a", role="table-no-borders" ]
|===
|
== Description

The AWS SNS Notify transform enables you to send notifications from an Apache Hop pipeline via Amazon Web Services Simple Notification Service to subscribed users.
|
== Supported Engines
[%noheader,cols="2,1a",frame=none, role="table-supported-engines"]
!===
!Hop Engine! image:check_mark.svg[Supported, 24]
!Spark! image:question_mark.svg[Supported, 24]
!Flink! image:question_mark.svg[Supported, 24]
!Dataflow! image:question_mark.svg[Supported, 24]
!===
|===

== Preconditions

Before the first execution you need to create an IAM-Role (e.g. for usage on EC2/ECS) or an IAM-User with an AWS Key and Secret and attach the required policies for pushing notifications via SNS.

You also need to create one ore more subscription topics you want to push the messages to.

== Options

=== AWS Settings tab

[options="header", width="90%"]
|===
|option|description
|Use AWS Credentials chain|Apache Hop tries to pick up the AWS credentials from the host environment. For more information, check the https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/credentials.html[Credentials] docs.
|AWS Access Key|your AWS Access Key (`AWS_ACCESS_KEY_ID`)
|AWS Secret Access Key|the secret for your AWS Access Key (`AWS_SECRET_ACCESS_KEY`)
|AWS Region|the AWS-Region the service is running in.
|===

=== Notifications

On the Notifications Tab you can define the behaviour when notifications will be send, the topicARN, the content and a Field for the MessageID.

[options="header", width="90%"]
|===
|Option|Description
|Event type
a| please choose whether a notifications should be send with:

* the first row (recommended)
* or for each row (be carefully not to spam your users!).
|Message ID| for each notification a Message-ID is retrieved from SNS. This can be written to an output field defined here.
|SNS-Fields table
a|**In the table only three rows** are valid (all others will be ignored an refused on save/load of transformation).

All rows can be specified either from a field (`Field` column) or as a static value (`Static value` column). Toggle between field or static value with the `Value in Field?` option.

** topicARN: the ARN for your SNS topic
** Subject: the subject for the notification you want to send
** Message: the message you want to send

|===

== Metadata Injection Support

All fields of this transform support metadata injection.
18 changes: 15 additions & 3 deletions plugins/tech/aws/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@
<!-- Test dependencies -->
<mockito.version>1.10.19</mockito.version>
<powermock.version>2.0.9</powermock.version>
<aws-java-sdk-s3.version>1.12.279</aws-java-sdk-s3.version>
<aws-java-sdk-core.version>1.12.279</aws-java-sdk-core.version>
<redshift.jdbc.version>2.1.0.19</redshift.jdbc.version>
<aws-java-sdk-s3.version>1.12.651</aws-java-sdk-s3.version>
<aws-java-sdk-core.version>1.12.651</aws-java-sdk-core.version>
<aws-java-sdk-sns.version>1.12.651</aws-java-sdk-sns.version>
<aws-java-sdk-sqs.version>1.12.651</aws-java-sdk-sqs.version>
<redshift.jdbc.version>2.1.0.25</redshift.jdbc.version>
</properties>


Expand Down Expand Up @@ -65,6 +67,16 @@
<version>${aws-java-sdk-core.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-sns</artifactId>
<version>${aws-java-sdk-sns.version}</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-sqs</artifactId>
<version>${aws-java-sdk-sqs.version}</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-s3</artifactId>
Expand Down
Loading

0 comments on commit 32d6a48

Please sign in to comment.