From 9aac4f39a13f3182fbb8e4a6e6b83900b61cee9b Mon Sep 17 00:00:00 2001 From: Flook Peter Date: Wed, 16 Oct 2024 17:47:16 +0800 Subject: [PATCH] Move insta-ingration.yaml back to top level, use version 0.11.11 --- .github/workflows/check.yml | 2 +- README.md | 10 +++++----- .../insta-integration.yaml => insta-integration.yaml | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) rename misc/insta-integration/insta-integration.yaml => insta-integration.yaml (63%) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index fbf76fe..6930ad9 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -18,7 +18,7 @@ jobs: id: tests uses: data-catering/insta-integration@v1 with: - configuration_file: misc/insta-integration/insta-integration.yaml + data_caterer_version: 0.11.11 - name: Print results run: | echo "Records generated: ${{ steps.tests.outputs.num_records_generated }}" diff --git a/README.md b/README.md index 59a5107..94e2df7 100644 --- a/README.md +++ b/README.md @@ -153,16 +153,16 @@ kafka("my_kafka", "localhost:29092") #### But I want the same `account_id` to show in Postgres and Kafka ```scala +val postgresTask = postgres("customer_postgres", "jdbc:postgresql://localhost:5432/customer") + .schema(field.name("account_id").regex("ACC[0-9]{10}")) + val kafkaTask = kafka("my_kafka", "localhost:29092") .topic("account-topic") .schema(...) -val postgresTask = postgres("customer_postgres", "jdbc:postgresql://localhost:5432/customer") - .schema(field.name("account_id").regex("ACC[0-9]{10}")) - plan.addForeignKeyRelationship( - kafkaTask, List("account_id"), - List(postgresTask -> List("account_id")) + postgresTask, List("account_id"), + List(kafkaTask -> List("account_id")) ) ``` diff --git a/misc/insta-integration/insta-integration.yaml b/insta-integration.yaml similarity index 63% rename from misc/insta-integration/insta-integration.yaml rename to insta-integration.yaml index a9d0305..84038e6 100644 --- a/misc/insta-integration/insta-integration.yaml +++ b/insta-integration.yaml @@ -1,12 +1,12 @@ services: - name: postgres - data: ../../app/src/test/resources/sample/sql/postgres + data: app/src/test/resources/sample/sql/postgres run: - - command: java -jar ../../app/build/libs/data-caterer.jar + - command: java -jar app/build/libs/data-caterer.jar env: - PLAN_FILE_PATH: ../../app/src/test/resources/sample/plan/account-balance-transaction-plan.yaml - TASK_FOLDER_PATH: ../../app/src/test/resources/sample/task - APPLICATION_CONFIG_PATH: ../../app/src/main/resources/application.conf + PLAN_FILE_PATH: app/src/test/resources/sample/plan/account-balance-transaction-plan.yaml + TASK_FOLDER_PATH: app/src/test/resources/sample/task + APPLICATION_CONFIG_PATH: app/src/main/resources/application.conf generateFirst: false test: validation: