{"id":35131295,"url":"https://github.com/danieljhkim/hive-duck","last_synced_at":"2026-01-13T22:57:56.864Z","repository":{"id":330778801,"uuid":"1123920899","full_name":"danieljhkim/hive-duck","owner":"danieljhkim","description":"Hive-compatible CLI (-e, -f) backed by DuckDB for fast local SQL development without Hadoop or Hive.","archived":false,"fork":false,"pushed_at":"2025-12-27T23:50:10.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-30T02:28:07.021Z","etag":null,"topics":["cli","data-engineering","duckdb","hive","sql"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danieljhkim.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-27T23:17:12.000Z","updated_at":"2025-12-28T01:47:57.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/danieljhkim/hive-duck","commit_stats":null,"previous_names":["danieljhkim/hive-duck"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/danieljhkim/hive-duck","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danieljhkim%2Fhive-duck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danieljhkim%2Fhive-duck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danieljhkim%2Fhive-duck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danieljhkim%2Fhive-duck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danieljhkim","download_url":"https://codeload.github.com/danieljhkim/hive-duck/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danieljhkim%2Fhive-duck/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28400464,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cli","data-engineering","duckdb","hive","sql"],"created_at":"2025-12-28T05:28:15.538Z","updated_at":"2026-01-13T22:57:56.850Z","avatar_url":"https://github.com/danieljhkim.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hive-duck\n\n**hive-duck** is a Hive-compatible command-line tool that lets you run `hive -e` and `hive -f` style SQL locally using DuckDB instead of Hadoop and Hive.\n\nIt is designed for **fast local development and testing of Hive SQL** without standing up HDFS, YARN, or the Hive Metastore. Existing scripts can usually be run unchanged, while DuckDB provides a single-node, high-performance analytical execution engine.\n\nTypical use cases:\n- Develop and debug Hive SQL locally\n- Run CI checks for SQL pipelines without Hadoop\n- Replace local Hive-on-MapReduce or Spark SQL setups\n- Iterate quickly on Parquet-, Avro-, or CSV-based datasets\n\nhive-duck focuses on **CLI compatibility and correctness**, not distributed execution or performance parity with Spark.\n\n## Features\n\n- **Hive-compatible execution**  \n  Supports `-e` (inline SQL) and `-f` (SQL files) with behavior aligned to the Hive CLI.\n\n- **Variable substitution**  \n  Compatible with Hive-style variables: `${hivevar:...}`, `${hiveconf:...}`, and `${env:...}`.\n\n- **Hive statement handling**  \n  Common Hive statements such as `SET` and `USE` are rewritten or handled automatically for local execution.\n\n- **DuckDB-backed execution**  \n  Runs SQL using DuckDB’s in-process analytical engine for fast, single-node execution.\n\n- **Database mapping via YAML**  \n  Map Hive databases to DuckDB database files using a simple configuration file.\n\n- **Multiple output formats**  \n  Render query results as `table` (default), `csv`, `tsv`, or `json`.\n\n- **Extension support**  \n  Load DuckDB extensions (e.g. `avro`, `httpfs`, `json`) via a single flag.\n\n- **Compatibility checks**  \n  Detect unsupported Hive statements and optionally fail fast for CI use cases.\n\n\n## Install\n\n```bash\ngo install github.com/danieljhkim/hive-duck/cmd/hive-duck@latest\n```\n\nOr build from source:\n```bash\nmake build\n```\n\n## Quick Start\n\n```bash\n# Execute SQL string\nhive-duck -e \"SELECT 1\"\n\n# Execute SQL file\nhive-duck -f script.sql\n\n# With variables\nhive-duck -e \"SELECT '${hivevar:ds}'\" --hivevar ds=2025-01-15\n\n# Database mapping (YAML config)\nhive-duck -f query.sql --config databases.yaml\n\n# Output formats\nhive-duck -e \"SELECT * FROM table\" --output json\n```\n\n\n## Database Mapping\n\nCreate `databases.yaml`:\n```yaml\ndatabases:\n  analytics: ./data/analytics.duckdb\n  warehouse: ./data/warehouse.duckdb\ndefault: analytics\n```\n\nUse with `--config databases.yaml` to enable cross-database queries.\n\n## Flags\n\n| Flag | Description |\n|------|-------------|\n| `-e, --execute` | SQL string to execute |\n| `-f, --file` | SQL file to execute |\n| `--config` | Path to databases.yaml |\n| `--database` | DuckDB file path or `:memory:` |\n| `--output` | Output format: `table`, `csv`, `tsv`, `json` |\n| `--dry-run` | Print rewritten SQL without executing |\n| `--fail-on-unsupported` | Fail if unsupported Hive statements detected |\n| `--hivevar`, `--hiveconf` | Pass variables (repeatable) |\n| `--ext` | Comma-separated DuckDB extensions |\n\n## Development\n\n```bash\nmake build        # Build the binary\nmake test-all     # Run unit and integration tests\nmake test-golden  # Run golden SQL output tests\nmake ci           # Format, lint, and test\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanieljhkim%2Fhive-duck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanieljhkim%2Fhive-duck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanieljhkim%2Fhive-duck/lists"}