Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update the develop branch with items from main #103

Closed
wants to merge 92 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
b046d6c
upgrade to spark 3.2
mantovani Dec 13, 2021
dc2fae3
port to spark 3.2
mantovani Dec 13, 2021
82cf904
resolve conflicts
badrinathpatchikolla May 5, 2022
ed57407
Remove __TABLE__ and fixed spark xml version for spark 3.2
badrinathpatchikolla May 5, 2022
b2dd746
Update build.sbt
badrinathpatchikolla May 7, 2022
ff3b505
Merge pull request #46 from badrinathpatchikolla/spark-3.2
mantovani May 9, 2022
0b7a124
Update README.md
badrinathpatchikolla May 16, 2022
21a1831
Merge pull request #47 from badrinathpatchikolla/spark-3.2
mantovani May 16, 2022
0e5da13
latest spark version
mantovani May 17, 2022
7c43dd6
fixed spark build
mantovani May 17, 2022
8f88d0e
upgrade to latest version
mantovani May 17, 2022
9b29b5d
add bsp
mantovani May 17, 2022
92fa4f5
upgrade version
mantovani May 17, 2022
3cd0f64
add metals
mantovani Jul 20, 2022
b1aaa1f
end of temporary table
mantovani Jul 20, 2022
41aa268
upgrade sbt
mantovani Jul 20, 2022
1f84052
update sbt
mantovani Jul 20, 2022
5ab7b05
Merge branch 'spark-3.2'
mantovani Jul 20, 2022
6144b0a
added deserializer changes for spark 2.4
badrinathpatchikolla Jul 20, 2022
36e704b
added deserializer changes for spark 2.4
badrinathpatchikolla Jul 20, 2022
3b2c166
added deserializer changes for spark 2.4
badrinathpatchikolla Jul 20, 2022
3d98805
added deserializer changes for spark 2.4
badrinathpatchikolla Jul 20, 2022
fd29e24
added deserializer changes for spark 2.4
badrinathpatchikolla Jul 20, 2022
b802ef7
Added TargetFile code changes - 3.2
sharath-sg2706 Jul 20, 2022
8ad9da1
Merge pull request #52 from sharath-sg2706/spark-3.2
mantovani Jul 21, 2022
9e0b185
update version
mantovani Jul 21, 2022
48d85d9
Merge branch 'spark-3.2'
mantovani Jul 21, 2022
67099d2
Synced with Master
badrinathpatchikolla Jul 26, 2022
fd96a63
Synced with Master
badrinathpatchikolla Jul 26, 2022
b90b160
Synced with Master
badrinathpatchikolla Jul 26, 2022
3ffb24e
Merge pull request #57 from badrinathpatchikolla/feature/deserializer…
mantovani Jul 26, 2022
2b80e74
Added CSV Deserializer
badrinathpatchikolla Jul 27, 2022
691a9d9
Merge pull request #58 from badrinathpatchikolla/master
mantovani Sep 29, 2022
8d39204
fixed test cases issue and added csv option in target deserializer
badrinathpatchikolla Sep 29, 2022
fc58c7c
update version to v0.9.6-3.2
mantovani Sep 29, 2022
329c632
Merge pull request #60 from badrinathpatchikolla/master
mantovani Oct 4, 2022
8c29e29
fixed version
mantovani Oct 4, 2022
f2e518a
changes to scala 2.13
mantovani Oct 4, 2022
5c59c08
add support to scala 2.13
mantovani Oct 4, 2022
33e2d6a
upgrade quenya-dsl version
mantovani Oct 4, 2022
25b0704
Added Github Actions
badrinathpatchikolla Oct 4, 2022
b40e90e
Update almaren-framework.yml
badrinathpatchikolla Oct 4, 2022
bed69bc
Added Github Actions
badrinathpatchikolla Oct 4, 2022
fac0b1f
Added Github Actions
badrinathpatchikolla Oct 4, 2022
68d015a
Added Github Actions
badrinathpatchikolla Oct 4, 2022
bb9dbe0
Added Github Actions
badrinathpatchikolla Oct 4, 2022
c480b61
Added Github Actions
badrinathpatchikolla Oct 4, 2022
b2e6931
Added Postgres Host and password in commands
badrinathpatchikolla Oct 4, 2022
580f056
Added Postgres Host and password in commands
badrinathpatchikolla Oct 4, 2022
445c56d
uncommented test case for postgres without username and password
badrinathpatchikolla Oct 4, 2022
57826e4
create role statement
badrinathpatchikolla Oct 4, 2022
c50b3b1
create role statement
badrinathpatchikolla Oct 4, 2022
94eaed4
create role statement
badrinathpatchikolla Oct 4, 2022
f41b7d7
Added Test Case for SampleOptions in Deserializer #61
badrinathpatchikolla Oct 4, 2022
2a002dc
Added Test Case for SampleOptions in Deserializer #61
badrinathpatchikolla Oct 4, 2022
2df0334
Added Test Case for SampleOptions in Deserializer #61
badrinathpatchikolla Oct 4, 2022
9b13f55
Added Test Cases for Deserializer Sample Options #61
badrinathpatchikolla Oct 4, 2022
09b39eb
Removed Travis file
badrinathpatchikolla Oct 4, 2022
b913888
Merge pull request #62 from badrinathpatchikolla/spark-3.3
mantovani Oct 4, 2022
e63ffba
Merge pull request #64 from badrinathpatchikolla/spark-3.2
mantovani Oct 4, 2022
51a4504
upgrade maven version
mantovani Oct 4, 2022
e0940e6
upgrade maven version
mantovani Oct 4, 2022
b801246
Added compatibility Matrix in ReadMe
badrinathpatchikolla Oct 6, 2022
060eb3a
Added compatibility Matrix in ReadMe
pramodbiramoni Oct 6, 2022
1244cf7
Fixed ReadMe for compatibility Matrix
badrinathpatchikolla Oct 11, 2022
e426eab
Added compatibility Matrix in ReadMe
pramodbiramoni Oct 12, 2022
fb400d1
Merge pull request #67 from badrinathpatchikolla/master
mantovani Oct 12, 2022
e10199d
Merge pull request #68 from pramodbiramoni/spark-3.3
mantovani Oct 12, 2022
6096bcd
make discord the default chat
mantovani Oct 21, 2022
eee7d98
Merge branch 'master' of github.com:music-of-the-ainur/almaren-framework
mantovani Oct 21, 2022
f06ac3e
improved docx
mantovani Oct 21, 2022
d22fcf1
improved docx
mantovani Oct 21, 2022
453e835
Updating with master
sharath-sg2706 Nov 21, 2022
f568a82
Updating with master
sharath-sg2706 Nov 21, 2022
908f572
Updating with master
sharath-sg2706 Nov 21, 2022
8d1f1cb
Merge pull request #77 from sharath-sg2706/Sample
badrinathpatchikolla Apr 24, 2023
42e4d0e
Spark 3.4.x changes
badrinathpatchikolla Apr 24, 2023
ad78d7e
Fixed ReadMe
badrinathpatchikolla Apr 24, 2023
f2c8b17
added spark 3.4 readme changes
badrinathpatchikolla Apr 24, 2023
9fe45c3
Merge pull request #78 from badrinathpatchikolla/master
badrinathpatchikolla Apr 24, 2023
21bcbbd
updated the quenya dsl version
pradeepmaripala Aug 8, 2023
eda4da1
Update build.sbt
badrinathpatchikolla Sep 6, 2023
d2ab401
Merge pull request #89 from pradeepmaripala/master
badrinathpatchikolla Sep 6, 2023
4c4e029
Added Cache Argument Method
DV1207 Sep 27, 2023
83ecdca
Added Cache Argument Method
DV1207 Sep 27, 2023
dd1d923
Added Cache Argument Method
DV1207 Sep 28, 2023
77a75e6
Added Cache Argument Method
DV1207 Oct 4, 2023
ca4732d
Added Cache Argument Method
DV1207 Oct 5, 2023
e8c111b
updated build.sbt
DV1207 Oct 5, 2023
cbdc55f
updated build.properties
DV1207 Oct 5, 2023
bac2643
Merge pull request #92 from DV1207/master
badrinathpatchikolla Oct 5, 2023
f3fbb0c
fixed example
mantovani Nov 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/almaren-framework.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Almaren Framework
on: [push, pull_request]

jobs:
Build:
runs-on: ubuntu-20.04
services:
postgres:
image: postgres:13.4
env:
POSTGRES_PASSWORD: postgres
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name : Check out repository code
uses: actions/checkout@v2
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 8
cache: sbt

- name: Build and test scala version
run: |
PGPASSWORD="postgres" psql -c 'create database almaren;' -U postgres -h localhost
PGPASSWORD="postgres" psql -c "ALTER USER postgres PASSWORD 'postgres' ;" -U postgres -h localhost
PGPASSWORD="postgres" psql -c 'create role runner;' -U postgres -h localhost
PGPASSWORD="postgres" psql -c 'ALTER ROLE "runner" WITH LOGIN SUPERUSER INHERIT CREATEDB CREATEROLE REPLICATION;' -U postgres -h localhost
sbt ++2.12.15 test
sbt ++2.13.9 test
rm -rf "$HOME/.ivy2/local" || true
find $HOME/Library/Caches/Coursier/v1 -name "ivydata-*.properties" -delete || true
find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true
find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true
find $HOME/.sbt -name "*.lock" -delete || true
8 changes: 3 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
# vscode
.vscode/

# metals
.metals/
.bloop/
project/metals.sbt
project/project/
.bsp/
.bloop/
target/
project/project/

# spark
spark-warehouse

metastore_db
.gradle
.vertx
.metals
.bloop
.vscode

# mac
.DS_Store
Expand Down Expand Up @@ -140,3 +137,4 @@ flycheck_*.el
# directory configuration
.dir-locals.el


35 changes: 0 additions & 35 deletions .travis.yml

This file was deleted.

103 changes: 72 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

The Almaren Framework provides a simplified consistent minimalistic layer over Apache Spark, while still allowing you to take advantage of native Apache Spark features. You can even combine it with standard Spark code.

[![Build Status](https://travis-ci.com/mantovani/almaren-framework.svg?branch=master)](https://travis-ci.com/mantovani/almaren-framework)
[![Build Status](https://github.com/music-of-the-ainur/almaren-framework/actions/workflows/almaren-framework.yml/badge.svg)](https://github.com/music-of-the-ainur/almaren-framework/actions/workflows/almaren-framework.yml)
[![Gitter Community](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/music-of-the-ainur/community)


## Table of Contents

- [Introduction](#introduction)
* [Dependency](#dependency)
* [Connector Usage](#connector-usage)
* [Batch Example](#batch-example)
* [Streaming Example](#streaming-example)
- [Debugging](#debugging)
Expand Down Expand Up @@ -41,6 +43,7 @@ The Almaren Framework provides a simplified consistent minimalistic layer over A
+ [targetSolr](#targetsolr)
+ [targetMongoDb](#targetmongodb)
+ [targetBigQuery](#targetbigquery)
+ [targetFile](#targetfile)
- [Executors](#executors)
* [Batch](#batch)
* [Streaming Kafka](#streaming-kafka)
Expand All @@ -59,14 +62,35 @@ The Almaren Framework provides a simplified consistent minimalistic layer over A
To add Almaren Framework dependency to your sbt build:

```
libraryDependencies += "com.github.music-of-the-ainur" %% "almaren-framework" % "0.9.3-3.1"
libraryDependencies += "com.github.music-of-the-ainur" %% "almaren-framework" % "0.9.11-3.5"
```

To run in spark-shell:

For scala version(2.12):
```
spark-shell --packages "com.github.music-of-the-ainur:almaren-framework_2.12:0.9.11-3.5"
```
spark-shell --packages "com.github.music-of-the-ainur:almaren-framework_2.12:0.9.3-3.1"
For scala version(2.13):
```
spark-shell --packages "com.github.music-of-the-ainur:almaren-framework_2.13:0.9.11-3.5"
```
Almaren connector is available in
[Maven Central](https://mvnrepository.com/artifact/com.github.music-of-the-ainur) repository.

| version | Connector Artifact |
|----------------------------|-------------------------------------------------------------------|
| Spark 3.5.x and scala 2.13 | `com.github.music-of-the-ainur:almaren-framework_2.13:0.9.11-3.5` |
| Spark 3.5.x and scala 2.12 | `com.github.music-of-the-ainur:almaren-framework_2.12:0.9.11-3.5` |
| Spark 3.4.x and scala 2.13 | `com.github.music-of-the-ainur:almaren-framework_2.13:0.9.11-3.4` |
| Spark 3.4.x and scala 2.12 | `com.github.music-of-the-ainur:almaren-framework_2.12:0.9.11-3.4` |
| Spark 3.3.x and scala 2.13 | `com.github.music-of-the-ainur:almaren-framework_2.13:0.9.11-3.3` |
| Spark 3.3.x and scala 2.12 | `com.github.music-of-the-ainur:almaren-framework_2.12:0.9.11-3.3` |
| Spark 3.2.x and scala 2.12 | `com.github.music-of-the-ainur:almaren-framework_2.12:0.9.11-3.2` |
| Spark 3.1.x and scala 2.12 | `com.github.music-of-the-ainur:almaren-framework_2.12:0.9.11-3.1` |
| Spark 2.4.x and scala 2.12 | `com.github.music-of-the-ainur:almaren-framework_2.12:0.9.11-2.4` |
| Spark 2.4.x and scala 2.11 | `com.github.music-of-the-ainur:almaren-framework_2.11:0.9.11-2.4` |


### Batch Example
```scala
Expand All @@ -80,6 +104,7 @@ val almaren = Almaren("App Name")
val spark = almaren.spark
.master("local[*]")
.config("spark.sql.shuffle.partitions", "1")
.getOrCreate

val df:DataFrame = almaren.builder
.sourceSql("select monotonically_increasing_id() as id,* from movies")
Expand All @@ -90,8 +115,8 @@ val df:DataFrame = almaren.builder
|cast[1]$support_actor:StringType
|genres[0]$genre:StringType
|director@director
| director.name$credit_name:StringType""".stripMargin)
.sql("""SELECT * FROM __TABLE__ WHERE actor NOT IN ("the","the life of")""")
| director.name$credit_name:StringType""".stripMargin).alias("table")
.sql("""SELECT * FROM table WHERE actor NOT IN ("the","the life of")""")
.targetJdbc("jdbc:postgresql://localhost/almaren","org.postgresql.Driver","movies",SaveMode.Overwrite)
.batch
```
Expand Down Expand Up @@ -119,9 +144,9 @@ val streaming = almaren.builder
|text$message:StringType
|entities@entitie
| entitie.hashtags@hashtag
| hashtag.text$hashtag:StringType""".stripMargin)
.sql("SELECT DISTINCT * FROM __TABLE__")
.sql("""SELECT sha2(concat_ws("",array(*)),256) as unique_hash,*,current_timestamp from __TABLE__""")
| hashtag.text$hashtag:StringType""".stripMargin).alias("table")
.sql("SELECT DISTINCT * FROM table").alias("table1")
.sql("""SELECT sha2(concat_ws("",array(*)),256) as unique_hash,*,current_timestamp from table1""")
.targetJdbc("jdbc:postgresql://localhost/almaren","org.postgresql.Driver","twitter_streaming",SaveMode.Append)

almaren.streaming(streaming,Map("kafka.bootstrap.servers" -> "localhost:9092","subscribe" -> "twitter", "startingOffsets" -> "earliest"))
Expand Down Expand Up @@ -150,8 +175,8 @@ val df:DataFrame = almaren.builder
|cast[1]$support_actor:StringType
|genres[0]$genre:StringType
|director@director
| director.name$credit_name:StringType""".stripMargin)
.sql("""SELECT *,current_timestamp as date FROM __TABLE__ WHERE actor NOT IN ("the","the life of")""")
| director.name$credit_name:StringType""".stripMargin).alias("table")
.sql("""SELECT *,current_timestamp as date FROM table WHERE actor NOT IN ("the","the life of")""")
.targetJdbc("jdbc:postgresql://localhost/almaren","org.postgresql.Driver","movies",SaveMode.Overwrite)
.batch
```
Expand Down Expand Up @@ -336,6 +361,12 @@ Cache/Uncache both DataFrame or Table
cache(true)
```

Cache Dataframe with Storage Level

```scala
cache(true,storageLevel = MEMORY_AND_DISK)
```

#### Coalesce

Decrease the number of partitions in the RDD to numPartitions. Useful for running operations more efficiently after filtering down a large dataset.
Expand Down Expand Up @@ -481,6 +512,14 @@ Write to BigQuery using [BigQuery Connector](https://github.com/music-of-the-ain

Write to Neo4j using [Neo4j Connector](https://github.com/music-of-the-ainur/neo4j.almaren)

#### targetFile

Write to File, you must have the following parameters: format, path, saveMode of the file and parameters as a Map. For partitioning provide a list of columns, for bucketing provide number of buckets and list of columns, for sorting provide list of columns, and tableName. Check the [documentation](https://spark.apache.org/docs/latest/sql-data-sources-generic-options.html) for the full list of parameters.

```scala
targetFile("parquet","/home/abc/targetlocation/output.parquet",SaveMode.Overwrite,Map("batchSize"->10000),List("partitionColumns"),(5,List("bucketingColumns")),List("sortingColumns"),Some("sampleTableName"))
```

## Executors

Executors are responsible to execute Almaren Tree i.e ```Option[Tree]``` to Apache Spark. Without invoke an _executor_, code won't be executed by Apache Spark. Follow the list of _executors_:
Expand All @@ -499,8 +538,8 @@ val tree = almaren.builder
|cast[1]$support_actor:StringType
|genres[0]$genre:StringType
|director@director
| director.name$credit_name:StringType""".stripMargin)
.sql("""SELECT * FROM __TABLE__ WHERE actor NOT IN ("the","the life of")""")
| director.name$credit_name:StringType""".stripMargin).alias("table")
.sql("""SELECT * FROM table WHERE actor NOT IN ("the","the life of")""")
.targetJdbc("jdbc:postgresql://localhost/almaren","org.postgresql.Driver","movies",SaveMode.Overwrite)

val df:DataFrame = tree.batch
Expand Down Expand Up @@ -537,9 +576,9 @@ val tree = almaren.builder
|text$message:StringType
|entities@entitie
| entitie.hashtags@hashtag
| hashtag.text$hashtag:StringType""".stripMargin)
.sql("SELECT DISTINCT * FROM __TABLE__")
.sql("""SELECT sha2(concat_ws("",array(*)),256) as unique_hash,*,current_timestamp from __TABLE__""")
| hashtag.text$hashtag:StringType""".stripMargin).alias("table")
.sql("SELECT DISTINCT * FROM table").alias("table1")
.sql("""SELECT sha2(concat_ws("",array(*)),256) as unique_hash,*,current_timestamp from table1""")
.targetJdbc("jdbc:postgresql://localhost/almaren","org.postgresql.Driver","twitter_streaming",SaveMode.Append)

almaren.streaming(tree,Map("kafka.bootstrap.servers" -> "localhost:9092","subscribe" -> "twitter", "startingOffsets" -> "earliest"))
Expand Down Expand Up @@ -578,14 +617,14 @@ Default value of sample ratio is 1.0
val almaren = Almaren("appName")
val df:DataFrame = almaren.builder.sourceSql("SELECT * FROM db.schema.table")
.deserializer("JSON","json_str")
.dsl("uuid$id:StringType
.dsl("""uuid$id:StringType
|code$area_code:LongType
|names@name
| name.firstName$first_name:StringType
| name.secondName$second_name:StringType
| name.lastName$last_name:StringType
|source_id$source_id:LongType".stripMargin)
.sql("""SELECT *,unix_timestamp() as timestamp from __TABLE__""")
|source_id$source_id:LongType""".stripMargin).alias("table")
.sql("""SELECT *,unix_timestamp() as timestamp from table""")
.targetJdbc("jdbc:postgresql://localhost/database","org.postgresql.Driver","target_table",SaveMode.Append)
```

Expand All @@ -596,22 +635,22 @@ val df:DataFrame = almaren.builder.sourceSql("SELECT * FROM db.schema.table")
```scala
val almaren = Almaren("appName")

val target1 = almaren.builder.dsl("uuid$id:StringType
val target1 = almaren.builder.dsl("""uuid$id:StringType
|code$area_code:LongType
|names@name
| name.firstName$first_name:StringType
| name.secondName$second_name:StringType
| name.lastName$last_name:StringType
|source_id$source_id:LongType".stripMargin)
.sql("SELECT *,unix_timestamp() as timestamp from __TABLE__")
|source_id$source_id:LongType""".stripMargin).alias("table")
.sql("SELECT *,unix_timestamp() as timestamp from table")
.targetCassandra("test1","kv1")

val target2 = almaren.builder.dsl("uuid$id:StringType
val target2 = almaren.builder.dsl("""uuid$id:StringType
|code$area_code:LongType
|phones@phone
| phone.number$phone_number:StringType
|source_id$source_id:LongType".stripMargin)
.sql("SELECT *,unix_timestamp() as timestamp from __TABLE__")
|source_id$source_id:LongType""".stripMargin).alias("table")
.sql("SELECT *,unix_timestamp() as timestamp from table")
.targetCassandra("test2","kv2")

almaren.builder.sourceSql("SELECT * FROM db.schema.table")
Expand All @@ -636,7 +675,8 @@ val sourcePolicy = almaren.builder.sourceHbase("""{
|"status":{"cf":"Policy", "col":"status", "type":"string"},
|"person_id":{"cf":"Policy", "col":"source", "type":"long"}
|}
|}""").sql(""" SELECT * FROM __TABLE__ WHERE status = "ACTIVE" """).alias("policy")
|}""").alias("hbase")
.sql(""" SELECT * FROM hbase WHERE status = "ACTIVE" """).alias("policy")

val sourcePerson = almaren.builder.sourceHbase("""{
|"table":{"namespace":"default", "name":"person"},
Expand All @@ -647,12 +687,13 @@ val sourcePerson = almaren.builder.sourceHbase("""{
|"type":{"cf":"Policy", "col":"type", "type":"string"},
|"age":{"cf":"Policy", "col":"source", "type":"string"}
|}
|}""").sql(""" SELECT * FROM __TABLE__ WHERE type = "PREMIUM" """).alias("person")
|}""").alias("hbase")
.sql(""" SELECT * FROM hbase WHERE type = "PREMIUM" """).alias("person")

almaren.builder.sql(""" SELECT * FROM person JOIN policy ON policy.person_id = person.id """)
.sql("SELECT *,unix_timestamp() as timestamp FROM __TABLE__")
almaren.builder.sql(""" SELECT * FROM person JOIN policy ON policy.person_id = person.id """).alias("table")
.sql("SELECT *,unix_timestamp() as timestamp FROM table").alias("table1")
.coalesce(100)
.targetSql("INSERT INTO TABLE area.premimum_users SELECT * FROM __TABLE__")
.targetSql("INSERT INTO TABLE area.premimum_users SELECT * FROM table1")
.batch(sourcePolicy,sourceHbase)
```

Expand All @@ -662,8 +703,8 @@ almaren.builder.sql(""" SELECT * FROM person JOIN policy ON policy.person_id = p

```scala
val almaren = Almaren("appName")
val sourceData = almaren.builder.sourceJdbc("oracle.jdbc.driver.OracleDriver","jdbc:oracle:thin:@localhost:1521:xe","SELECT * FROM schema.table WHERE st_date >= (sysdate-1) AND st_date < sysdate")
.sql("SELECT to_json(named_struct('id', id,))) as __BODY__ from __TABLE__")
val sourceData = almaren.builder.sourceJdbc("oracle.jdbc.driver.OracleDriver","jdbc:oracle:thin:@localhost:1521:xe","SELECT * FROM schema.table WHERE st_date >= (sysdate-1) AND st_date < sysdate").alias("table")
.sql("SELECT to_json(named_struct('id', id,))) as __BODY__ from table")
.coalesce(30)
.targetHttp("https://host.com:9093/api/foo","post",Map("Authorization" -> "Basic QWxhZGRpbjpPcGVuU2VzYW1l"))

Expand Down
Loading
Loading