forked from GoogleCloudPlatform/DataflowTemplates
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cassandra metadata PR To accomodate Driver Loader Class (#33)
* Removed * * Create README.md for UDF samples (GoogleCloudPlatform#2083) This commit adds a README.md file to the directory. The README file provides descriptions for each of the sample Javascript UDF files in the directory, including their purpose and usage examples. Co-authored-by: labs-code-app[bot] <161369871+labs-code-app[bot]@users.noreply.github.com> * CassandraDriverConfigLoader from GCS (GoogleCloudPlatform#2077) * Added Config File Path * Added Fix for Loading Driver Options * Added Dependecy Fixes * Fix UT --------- Co-authored-by: liferoad <huxiangqian@gmail.com> Co-authored-by: labs-code-app[bot] <161369871+labs-code-app[bot]@users.noreply.github.com> Co-authored-by: Vardhan Vinay Thigle <39047439+VardhanThigle@users.noreply.github.com>
- Loading branch information
1 parent
c640d11
commit 0e3cca3
Showing
13 changed files
with
2,019 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# UDF Samples | ||
|
||
This directory contains sample Javascript UDFs that can be used to enrich, filter, route, and transform data in Dataflow pipelines. | ||
|
||
## enrich.js | ||
|
||
Adds a new field `source` with the value `pos` to the incoming JSON event. | ||
|
||
## enrich_log.js | ||
|
||
Adds fields to a Cloud Logging log entry received from Pub/Sub. Adds `inputSubscription` and `callingAppId` based on the log entry content. | ||
|
||
## filter.js | ||
|
||
Filters out incoming JSON events where the `severity` field is equal to `DEBUG`. | ||
|
||
## route.js | ||
|
||
Routes incoming JSON events to the dead-letter queue if they do not have a `severity` property. Throws an error with the event ID to trigger dead-letter queue routing. | ||
|
||
## transform.js | ||
|
||
Transforms fields of incoming JSON events. Normalizes the `source` field to lowercase, redacts `sensitiveField` to `REDACTED`, and removes `redundantField`. | ||
|
||
## transform_csv.js | ||
|
||
Transforms an incoming CSV line into a JSON object. The output JSON object has fields `location`, `name`, `age`, `color`, and `coffee`, mapped from the corresponding CSV columns. | ||
|
||
## transform_log.js | ||
|
||
Transforms Cloud Logging log entries received from Pub/Sub. If the log entry has a `textPayload`, it returns the `textPayload` as a string. Otherwise, it returns the original JSON object as a string. | ||
|
||
## transform_log_splunk.js | ||
|
||
Sets Splunk HTTP Event Collector (HEC) metadata for Cloud Logging log entries received from Pub/Sub. Sets the `index`, `source`, and `sourcetype` metadata fields based on the log entry content. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.