Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
.PHONY: install-tools
install-tools:
@echo "Installing tools..."
@echo "creating resultscache directory... '/tmp/sqlflow/resultscache'"
$(shell mkdir -p /tmp/sqlflow/resultscache)

.PHONY: setup-dev
setup-dev: install-tools

.PHONY: test
test: test-unit test-integration

Expand Down
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,29 @@ Key Features:
docker pull turbolytics/sql-flow:latest
```

2. Validate config against test data:
2. Setup Local Development Environment
```
make setup-dev
```

3. Validate config against test data:
```
docker run -v $(pwd)/dev:/tmp/conf -v /tmp/sqlflow:/tmp/sqlflow turbolytics/sql-flow:latest dev invoke /tmp/conf/config/examples/basic.agg.yml /tmp/conf/fixtures/simple.json

['{"city":"New York","city_count":28672}', '{"city":"Baltimore","city_count":28672}']
```

3. Start kafka locally using docker:
4. Start kafka locally using docker:
```
docker-compose -f dev/kafka-single.yml up -d
```

4. Publish test messages to kafka:
5. Publish test messages to kafka:
```
python3 cmd/publish-test-data.py --num-messages=10000 --topic="input-simple-agg-mem"
```

5. Start kafka consumer from inside docker-compose container, to verify SQLFlow output
6. Start kafka consumer from inside docker-compose container, to verify SQLFlow output
```
docker exec -it kafka1 kafka-console-consumer --bootstrap-server=kafka1:9092 --topic=output-simple-agg-mem
```
Expand Down