Also in docs/dev/quickstarts.md
Query the lake
Read your datasets with a structured query or SQL, from any service. About 2 minutes.
You need:
- An API key in
PYROSYNC_API_KEYand the deployment URL inPYROSYNC_URL(for examplehttps://app.example.com). - A dataset with rows, for example
contactsfrom the CSV quickstart.
1. List datasets
GET /api/v1/datasets
curl -sS -X GET "$PYROSYNC_URL/api/v1/datasets" \
-H "X-API-Key: $PYROSYNC_API_KEY"
2. Run a structured query
POST /api/v1/queries
curl -sS -X POST "$PYROSYNC_URL/api/v1/queries" \
-H "X-API-Key: $PYROSYNC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": {
"table": "contacts",
"select": [
"email",
"name"
]
},
"limit": 10
}'
Send {"sql": "SELECT …", "params": […]} for SQL instead. Results page with pageSize and the returned cursor.
Result: Up to ten rows from contacts.
Cost: Counts against the workspace query quota, not credits.