- Docker and Docker Compose installed on your system
- Your SQL queries ready in the proper directory structure
- Ensure you have the required files:
- Your queries organized in
queries/queryN/directories - Test scripts in a mounted directory (e.g., in
queries/queryN/)
Run the reducer directly with docker compose run:
docker compose run --rm redusql \
--query /app/queries/query1/original_test.sql \
--test /app/queries/query1/test_query_1.shThe --rm flag automatically removes the container after execution.
docker compose run --rm --entrypoint /bin/bash redusqlThen run commands inside the container:
redusql --query /app/queries/query1/original_test.sql --test /app/queries/query1/test_query_1.shEach query should be organized in its own directory under queries/:
- SQL Query File:
original_test.sql- The SQL query to reduce
Example directory structure:
queries/
├── query1/
│ ├── original_test.sql
│ └── test_query_1.sh
├── query2/
│ ├── original_test.sql
│ └── test_query_2.sh
└── ...
ReduSQL automatically saves results to a directory output inside the same directory as your original_test.sql file.
output/
├── query1/
│ └── original_test_reduced.sql
│ └── original_test_reduced_info.txt
├── query2/
│ └── original_test_reduced.sql
│ └── original_test_reduced_info.txt
└── ...
original_test_reduced.sql- The minimized SQL queryoriginal_test_reduced_info.txt- Information about the reduction