Skip to content
This repository was archived by the owner on Aug 8, 2025. It is now read-only.

Commit 65dc36b

Browse files
committed
Update to 0.14.5
1 parent fa2052e commit 65dc36b

16 files changed

Lines changed: 124 additions & 25 deletions

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
FROM datacatering/data-caterer:0.14.2
1+
FROM datacatering/data-caterer:0.14.5
22

33
COPY --chown=app:app build/libs/data-caterer-example-0.1.0.jar /opt/app/job.jar

docker/data/custom/plan/http.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: "http_example_plan"
22
description: "Hit HTTP endpoint with account data"
33
tasks:
4-
- name: "json_account_http"
4+
# - name: "json_account_http"
5+
- name: "simple_http"
56
dataSourceName: "httpbin"
67
enabled: true

docker/data/custom/task/http/http-account-task-simple.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: "simple_http"
22
steps:
33
- name: "account"
44
count:
5-
records: 50
5+
records: 5
66
fields:
77
- name: "httpUrl"
88
type: struct
@@ -31,6 +31,7 @@ steps:
3131
- name: "Content-Type"
3232
static: "application/json"
3333
- name: "Content-Length"
34+
type: "integer"
3435
- name: "X-Account-Id"
3536
options:
3637
sql: "body.account_id"
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: "iceberg_account_checks"
3+
description: "Check account related fields have gone through system correctly"
4+
dataSources:
5+
iceberg:
6+
- options:
7+
path: "/data/iceberg/customer/account"
8+
validations:
9+
- field: account_id
10+
validation:
11+
- type: unique
12+
- field: open_time
13+
validation:
14+
- type: isIncreasing
15+
- groupByFields: [ account_id ]
16+
aggType: sum
17+
aggExpr: sum(balance) > 0
18+
- preFilterExpr: status == 'closed'
19+
expr: balance == 0
20+
- aggType: count
21+
aggExpr: count == 1000
22+
- upstreamDataSource: "csv_accounts"
23+
joinFields: ["account_id"]
24+
validations:
25+
- expr: "balance == csv_accounts.balance"

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ version=0.1.0
88

99
scalaVersion=2.12
1010
scalaSpecificVersion=2.12.19
11-
dataCatererVersion=0.14.2
11+
dataCatererVersion=0.14.5
1212
sparkMajorVersion=3.5

helm/data-caterer/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ image:
88
repository: "datacatering/data-caterer"
99
pullPolicy: "IfNotPresent"
1010
# Overrides the image tag whose default is the chart appVersion.
11-
tag: "0.14.2"
11+
tag: "0.14.5"
1212

1313
imagePullSecrets: []
1414
nameOverride: ""

run.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ fi
5252
docker network create --driver bridge docker_default || true
5353

5454
echo "Running Data Caterer via docker, version: $data_caterer_version"
55+
docker network inspect insta-infra_default >/dev/null 2>&1 || docker network create --driver bridge insta-infra_default --label com.docker.compose.network="default"
5556
DOCKER_CMD=(
5657
docker run -p 4040:4040
5758
-v "$(pwd)/build/libs/data-caterer-example-0.1.0.jar:/opt/app/job.jar"
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
package io.github.datacatering.plan;
2+
3+
import io.github.datacatering.datacaterer.api.model.DateType;
4+
import io.github.datacatering.datacaterer.api.model.DecimalType;
5+
import io.github.datacatering.datacaterer.api.model.DoubleType;
6+
import io.github.datacatering.datacaterer.api.model.TimestampType;
7+
import io.github.datacatering.datacaterer.javaapi.api.PlanRun;
8+
9+
import java.util.List;
10+
import java.util.Map;
11+
12+
public class CsvGenerateIcebergValidateJavaPlan extends PlanRun {
13+
{
14+
var accountTask = csv("csv_accounts", "/opt/app/data/csv/customer/account", Map.of("header", "true"))
15+
.fields(metadataSource().openDataContractStandard("/opt/app/mount/odcs/full-example.odcs.yaml"));
16+
17+
var transactionTask = iceberg("iceberg_transactions", "/opt/app/csv/data/customer/transaction", "dev.transactions")
18+
.validations(
19+
validation().unique("account_id"),
20+
validation().groupBy("account_id").sum("balance").greaterThan(0),
21+
validation().field("open_time").isIncreasing(),
22+
validation().count().isEqual(1000),
23+
validation().preFilter(validation().field("status").isEqual("closed")).field("balance").isEqual(0),
24+
validation().upstreamData(accountTask)
25+
.joinFields("account_id")
26+
.validations(
27+
validation().field("open_time").isEqualField("csv_accounts_open_time"),
28+
validation().groupBy("account_id", "csv_accounts_balance").sum("amount").isEqualField("csv_accounts_balance")
29+
)
30+
)
31+
.validationWait(waitCondition().file("/opt/app/data/iceberg/customer/transaction"));
32+
33+
var config = configuration()
34+
.generatedReportsFolderPath("/opt/app/data/report")
35+
.enableUniqueCheck(true);
36+
37+
execute(config, accountTask, transactionTask);
38+
}
39+
}

src/main/java/io/github/datacatering/plan/KafkaJavaPlanRun.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@
1414
public class KafkaJavaPlanRun extends PlanRun {
1515
{
1616
var kafkaTask = getKafkaTask();
17-
18-
var conf = configuration()
19-
.generatedReportsFolderPath("/opt/app/data/report");
20-
17+
var conf = configuration().generatedReportsFolderPath("/opt/app/data/report");
2118
execute(conf, kafkaTask);
2219
}
2320

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package io.github.datacatering.plan;
2+
3+
import io.github.datacatering.datacaterer.javaapi.api.PlanRun;
4+
5+
public class PostgresAutoJavaPlan extends PlanRun {
6+
{
7+
var accountTask = postgres("customer_accounts", "jdbc:postgresql://host.docker.internal:5432/customer");
8+
9+
var config = configuration().enableGeneratePlanAndTasks(true);
10+
execute(config, accountTask);
11+
}
12+
}

0 commit comments

Comments
 (0)