{"id":31648937,"url":"https://github.com/gigapi/gigapi-querier","last_synced_at":"2025-10-07T07:03:30.935Z","repository":{"id":287377877,"uuid":"964529122","full_name":"gigapi/gigapi-querier","owner":"gigapi","description":"DuckDB Query Engine for GigAPI","archived":false,"fork":false,"pushed_at":"2025-07-22T17:01:21.000Z","size":4820,"stargazers_count":8,"open_issues_count":5,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-22T19:04:13.971Z","etag":null,"topics":["arrow-flight","datalake","duckdb","duckdb-server","flightsql","gigapipe","influxdb3","lakehouse","lakehouse-engine","parquet"],"latest_commit_sha":null,"homepage":"https://gigapipe.com/gigapi","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gigapi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-11T11:03:47.000Z","updated_at":"2025-07-18T02:45:42.000Z","dependencies_parsed_at":"2025-04-26T12:22:29.422Z","dependency_job_id":"d39fbbf0-652d-4a00-8bd9-f4b309b793b6","html_url":"https://github.com/gigapi/gigapi-querier","commit_stats":null,"previous_names":["gigapi/gigapi_querier"],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/gigapi/gigapi-querier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gigapi%2Fgigapi-querier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gigapi%2Fgigapi-querier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gigapi%2Fgigapi-querier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gigapi%2Fgigapi-querier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gigapi","download_url":"https://codeload.github.com/gigapi/gigapi-querier/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gigapi%2Fgigapi-querier/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278734416,"owners_count":26036404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arrow-flight","datalake","duckdb","duckdb-server","flightsql","gigapipe","influxdb3","lakehouse","lakehouse-engine","parquet"],"created_at":"2025-10-07T07:02:01.491Z","updated_at":"2025-10-07T07:03:30.925Z","avatar_url":"https://github.com/gigapi.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![image](https://github.com/user-attachments/assets/fa3788a2-9a5b-47bf-b6ef-f818ba62a404)\n\n# GigAPI Query Engine\n\nGigAPI Go provides a Flight SQL and HTTP interface to query time-series using GigAPI Catalog Metadata and DuckDB\n\n\u003e [!WARNING]  \n\u003e GigAPI is an open beta developed in public. Bugs and changes should be expected. Use at your own risk.\n\u003e \n\n## \u003cimg src=\"https://github.com/user-attachments/assets/a9aa3ebd-9164-476d-aedf-97b817078350\" width=24 /\u003e Quick Start\n\n### Docker\nRun `gigapi` _all-in-one_ using Docker making sure the proper `data` with local storage\n```yaml\nservices:\n  gigapi:\n    image: ghcr.io/gigapi/gigapi:latest\n    container_name: gigapi\n    hostname: gigapi\n    restart: unless-stopped\n    volumes:\n      - ./data:/data\n    ports:\n      - \"7971:7971\"\n    environment:\n      - GIGAPI_ROOT=/data\n      - GIGAPI_LAYERS_0_NAME=default\n      - GIGAPI_LAYERS_0_TYPE=fs\n      - GIGAPI_LAYERS_0_URL=file:///data\n\n```\nGigapi-querier is part of [gigapi](https://github.com/gigapi/gigapi)\n\n### Build\n```bash\n# Build from source\ngo generate\ngo build -o gq .\n\n# Start the server\nPORT=8080 DATA_DIR=./data ./gigapi\n```\n\n### Configuration\n\n- `PORT`: Main server port (default: 8080)\n- `FLIGHTSQL_PORT`: FlightSQL API server port (default: 8082)\n- `DATA_DIR`: Path to data directory (default: ./data)\n- `DISABLE_UI`: Disable web UI (optional)\n\n## \u003cimg src=\"https://github.com/user-attachments/assets/a9aa3ebd-9164-476d-aedf-97b817078350\" width=24 /\u003e API Endpoints\n\n### Query Data\n\n#### Query Processing Logic\n\n1. Parse SQL query to extract FROM db.table and time range\n2. Find relevant parquet files using catalog metadata\n3. Use DuckDB to execute optimized queries against selected files\n4. Post-process results to handle BigInt timestamps\n\n\n\n#### \u003cimg src=\"https://github.com/user-attachments/assets/a9aa3ebd-9164-476d-aedf-97b817078350\" width=24 /\u003e API\n```bash\n$ curl -X POST \"http://localhost:8080/query?db=mydb\" \\\n  -H \"Content-Type: application/json\"  \\\n  -d '{\"query\": \"SELECT time, location, temperature FROM weather WHERE time \u003e= '2025-04-01T00:00:00'\"}'\n```\n\n#### \u003cimg src=\"https://github.com/user-attachments/assets/a9aa3ebd-9164-476d-aedf-97b817078350\" width=24 /\u003e CLI\nThe GigAPI Querier can also be used in CLI mode to execute an individual query\n\n```bash\n$ ./gigapi --query \"SELECT count(*), avg(temperature) FROM weather\" --db mydb\n```\n\n#### \u003cimg src=\"https://github.com/user-attachments/assets/a9aa3ebd-9164-476d-aedf-97b817078350\" width=24 /\u003e FlightSQL\nGigAPI data can be accessed using FlightSQL GRPC clients in any language\n```python\nfrom flightsql import connect, FlightSQLClient\nclient = FlightSQLClient(host='localhost',port=8082,insecure=True,metadata={'bucket':'hep'})\nconn = connect(client)\ncursor = conn.cursor()\ncursor.execute('SELECT 1, version()')\nprint(\"rows:\", [r for r in cursor])\n```\n\n#### \u003cimg src=\"https://github.com/user-attachments/assets/a9aa3ebd-9164-476d-aedf-97b817078350\" width=24 /\u003e UI\nA quick and dirty query user-interface is also provided for testing\n![image](https://github.com/user-attachments/assets/a9f09b3f-10fc-42e3-9092-770252e0d8d3)\n\n#### \u003cimg src=\"https://github.com/user-attachments/assets/a9aa3ebd-9164-476d-aedf-97b817078350\" width=24 /\u003e Grafana\nGigAPI can be used from Grafana using the InfluxDB3 Flight GRPC Datasource\n\n![image](https://github.com/user-attachments/assets/a7849ff4-b8f6-433b-8458-1c47394c5e5f)\n\n\n\u003cbr\u003e\n\n### Got Questions?\n[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/gigapi/gigapi-querier)\n\n## License\n\n\u003cimg src=\"https://upload.wikimedia.org/wikipedia/commons/thumb/0/06/AGPLv3_Logo.svg/2560px-AGPLv3_Logo.svg.png\" width=200\u003e\n\n\u003e Gigapipe is released under the GNU Affero General Public License v3.0 ©️ HEPVEST BV, All Rights Reserved.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgigapi%2Fgigapi-querier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgigapi%2Fgigapi-querier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgigapi%2Fgigapi-querier/lists"}