Bạn có một global secondary index mới mà bạn có thể sử dụng để truy vấn nhân viên theo thành phố. Chạy lệnh Python sau để liệt kê tất cả nhân viên theo bộ phận ở Dallas, Texas.
python query_city_dept.py employees TX --citydept Dallas
Kết quả sẽ giống như sau.
List of employees . State: TX
Name: Grayce Duligal. City: Dallas. Dept: Development
Name: Jere Vaughn. City: Dallas. Dept: Development
Name: Valeria Gilliatt. City: Dallas. Dept: Development
...
Name: Brittani Hunn. City: Dallas. Dept: Support
Name: Oby Peniello. City: Dallas. Dept: Support
Total of employees: 47. Execution time: 0.21702003479 seconds