@@ -40,10 +40,15 @@ help:
4040 @echo " ${BLUE}${INFO} 🚀 run-sql${RESET} - Run the Flink Table API application"
4141 @echo " ${BLUE}${INFO} 🧪 ci-checks${RESET} - Run CI checks locally"
4242 @echo " "
43- @echo " ${YELLOW}${STAR} Data Generator:${RESET} "
43+ @echo " ${YELLOW}${STAR} Data Generators:${RESET} "
44+ @echo " ${BLUE}${INFO} 🏗️ build-data-generator${RESET} - Build the Flink Data Generator module"
45+ @echo " ${BLUE}${INFO} 🏗️ build-ref-generator${RESET} - Build the Reference Data Generator module"
4446 @echo " ${BLUE}${INFO} 🚀 run-data-generator-local${RESET} - Run the Flink Data Generator in local environment"
4547 @echo " ${BLUE}${INFO} ☁️ run-data-generator-cloud${RESET} - Run the Flink Data Generator in cloud environment"
4648 @echo " ${BLUE}${INFO} 🚀 run-data-generator-with-props${RESET} - Run with custom properties (PROPS=path/to/properties)"
49+ @echo " ${BLUE}${INFO} 🚀 run-ref-generator-local${RESET} - Run the Reference Data Generator in local environment"
50+ @echo " ${BLUE}${INFO} ☁️ run-ref-generator-cloud${RESET} - Run the Reference Data Generator in cloud environment"
51+ @echo " ${BLUE}${INFO} 🚀 run-ref-generator-with-props${RESET} - Run the Reference Data Generator with custom properties (PROPS=path/to/properties)"
4752 @echo " "
4853 @echo " ${YELLOW}${STAR} Flink Table API:${RESET} "
4954 @echo " ${BLUE}${INFO} 🚀 run-sql-status-local${RESET} - Run Flight Status Dashboard locally"
5560 @echo " ${BLUE}${INFO} ☁️ run-sql-delays-cloud${RESET} - Run Airline Delay Analytics on cloud"
5661 @echo " ${BLUE}${INFO} ☁️ run-sql-all-cloud${RESET} - Run all SQL use cases on cloud"
5762 @echo " "
63+ @echo " ${YELLOW}${STAR} Flink SQL:${RESET} "
64+ @echo " ${BLUE}${INFO} 🚀 flink-sql-client${RESET} - Start interactive Flink SQL client"
65+ @echo " ${BLUE}${INFO} 🚀 flink-sql-execute${RESET} - Execute a specific SQL file (SQL_FILE=path/to/file.sql)"
66+ @echo " ${BLUE}${INFO} 🚀 flink-sql-build${RESET} - Build Flink SQL client image"
67+ @echo " "
5868 @echo " ${YELLOW}${STAR} Docker Management:${RESET} "
5969 @echo " ${BLUE}${INFO} 🐳 docker-up${RESET} - Start all containers"
6070 @echo " ${BLUE}${INFO} 🐳 docker-down${RESET} - Stop and remove all containers"
@@ -297,7 +307,7 @@ terraform-org-id:
297307 exit 1; \
298308 fi
299309 @echo " ${BLUE}${INFO} Exporting organization ID to TF_VAR_org_id...${RESET} "
300- @export TF_VAR_org_id=$$(confluent organization list -o json | jq -c -r '.[] | select(.is_current ) ' | jq ' .id' ); \
310+ @export TF_VAR_org_id=$$(confluent organization list -o json | jq -c -r '.[] | select(.is_current ) ' | jq -r ' .id' ); \
301311 echo " TF_VAR_org_id=$$ TF_VAR_org_id" ; \
302312 echo " export TF_VAR_org_id=$$ TF_VAR_org_id" >> .env; \
303313 echo " ${GREEN}${CHECK} Organization ID exported to TF_VAR_org_id and saved to .env file!${RESET} "
@@ -460,7 +470,8 @@ docker-logs:
460470
461471docker-restart :
462472 @echo " ${BLUE}${ROCKET} Restarting Docker containers...${RESET} "
463- docker compose restart
473+ docker compose down
474+ docker compose up -d
464475 @echo " ${GREEN}${CHECK} Docker containers restarted successfully!${RESET} "
465476
466477# Run CI checks locally
@@ -492,26 +503,45 @@ docker-build:
492503 @echo " ${GREEN}${CHECK} Docker image built successfully!${RESET} "
493504 @echo " ${YELLOW}${INFO} Run with: docker run -it flink-for-java-workshop:local${RESET} "
494505
506+ # Flink SQL related targets
507+ .PHONY : flink-sql-client flink-sql-execute flink-sql-build
508+
509+ flink-sql-build :
510+ @echo " ${BLUE}${ROCKET} Building Flink SQL client image...${RESET} "
511+ docker compose build jobmanager
512+ docker compose build taskmanager
513+
514+ flink-sql-client :
515+ @echo " ${BLUE}${ROCKET} Starting interactive Flink SQL client...${RESET} "
516+ docker compose run --rm sql-client
517+
518+ flink-sql-execute :
519+ @echo " ${BLUE}${ROCKET} Executing SQL file...${RESET} "
520+ @if [ -z " $( SQL_FILE) " ]; then \
521+ echo " ${RED}${ERROR} SQL_FILE parameter is required${RESET} " ; \
522+ echo " Example: make flink-sql-execute SQL_FILE=usecases/airline_delays.sql" ; \
523+ exit 1; \
524+ fi
525+ docker compose run --rm -e SQL_FILE=$(SQL_FILE ) sql-client
526+
495527# Flink Data Generator targets
496- .PHONY : build-data-generator
528+ .PHONY : build-data-generator run-data-generator-local run-data-generator-cloud run-data-generator-with-props
529+
497530build-data-generator :
498531 @echo " ${BLUE}${ROCKET} Building Flink Data Generator...${RESET} "
499532 ./gradlew :flink-data-generator:build
500533 @echo " ${GREEN}${CHECK} Flink Data Generator built successfully!${RESET} "
501534
502- .PHONY : run-data-generator-local
503535run-data-generator-local :
504536 @echo " ${BLUE}${ROCKET} Running Flink Data Generator in local environment...${RESET} "
505537 ./gradlew :flink-data-generator:run --args=" --env local"
506538 @echo " ${GREEN}${CHECK} Flink Data Generator completed!${RESET} "
507539
508- .PHONY : run-data-generator-cloud
509540run-data-generator-cloud :
510541 @echo " ${BLUE}${CLOUD} Running Flink Data Generator in cloud environment...${RESET} "
511542 ./gradlew :flink-data-generator:run --args=" --env cloud"
512543 @echo " ${GREEN}${CHECK} Flink Data Generator completed!${RESET} "
513544
514- .PHONY : run-data-generator-with-props
515545run-data-generator-with-props :
516546 @echo " ${BLUE}${ROCKET} Running Flink Data Generator with custom properties...${RESET} "
517547 @if [ -z " $( PROPS) " ]; then \
@@ -521,6 +551,33 @@ run-data-generator-with-props:
521551 ./gradlew :flink-data-generator:run --args=" --properties $( PROPS) "
522552 @echo " ${GREEN}${CHECK} Flink Data Generator completed!${RESET} "
523553
554+ # Reference Data Generator targets
555+ .PHONY : build-ref-generator run-ref-generator-local run-ref-generator-cloud run-ref-generator-with-props
556+
557+ build-ref-generator :
558+ @echo " ${BLUE}${ROCKET} Building Reference Data Generator...${RESET} "
559+ ./gradlew :data-generator:build
560+ @echo " ${GREEN}${CHECK} Reference Data Generator built successfully!${RESET} "
561+
562+ run-ref-generator-local :
563+ @echo " ${BLUE}${ROCKET} Running Reference Data Generator in local environment...${RESET} "
564+ ./gradlew :data-generator:run --args=" --env local"
565+ @echo " ${GREEN}${CHECK} Reference Data Generator completed!${RESET} "
566+
567+ run-ref-generator-cloud :
568+ @echo " ${BLUE}${CLOUD} Running Reference Data Generator in cloud environment...${RESET} "
569+ ./gradlew :data-generator:run --args=" --env cloud"
570+ @echo " ${GREEN}${CHECK} Reference Data Generator completed!${RESET} "
571+
572+ run-ref-generator-with-props :
573+ @echo " ${BLUE}${ROCKET} Running Reference Data Generator with custom properties...${RESET} "
574+ @if [ -z " $( PROPS) " ]; then \
575+ echo " ${RED}${ERROR} Please specify properties file with PROPS=path/to/properties.${RESET} " ; \
576+ exit 1; \
577+ fi
578+ ./gradlew :data-generator:run --args=" --properties $( PROPS) "
579+ @echo " ${GREEN}${CHECK} Reference Data Generator completed!${RESET} "
580+
524581# Clean up
525582.PHONY : clean
526583clean :
0 commit comments