{"id":19484471,"url":"https://github.com/flowerinthenight/athena2csv","last_synced_at":"2025-07-21T18:35:50.092Z","repository":{"id":73334313,"uuid":"174704700","full_name":"flowerinthenight/athena2csv","owner":"flowerinthenight","description":"Query AWS Athena and download the result as CSV.","archived":false,"fork":false,"pushed_at":"2021-11-11T18:43:49.000Z","size":742,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T00:41:30.593Z","etag":null,"topics":["athena","csv","go","golang","s3","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/flowerinthenight.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}},"created_at":"2019-03-09T14:31:27.000Z","updated_at":"2021-11-11T18:43:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"5a5303c2-962a-44e3-b775-24f5f0f36dfa","html_url":"https://github.com/flowerinthenight/athena2csv","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/flowerinthenight/athena2csv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowerinthenight%2Fathena2csv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowerinthenight%2Fathena2csv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowerinthenight%2Fathena2csv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowerinthenight%2Fathena2csv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flowerinthenight","download_url":"https://codeload.github.com/flowerinthenight/athena2csv/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowerinthenight%2Fathena2csv/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266352849,"owners_count":23915831,"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-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["athena","csv","go","golang","s3","sql"],"created_at":"2024-11-10T20:21:58.835Z","updated_at":"2025-07-21T18:35:50.070Z","avatar_url":"https://github.com/flowerinthenight.png","language":"Go","readme":"[![CircleCI](https://circleci.com/gh/flowerinthenight/athena2csv/tree/master.svg?style=svg)](https://circleci.com/gh/flowerinthenight/athena2csv/tree/master)\r\n\r\n## Overview\r\nThis tool can download an [Athena](https://aws.amazon.com/athena/) SQL query results in CSV format.\r\n\r\n## Installation\r\nUsing [Homebrew](https://brew.sh/):\r\n```bash\r\n$ brew tap flowerinthenight/tap\r\n$ brew install athena2csv\r\n```\r\n\r\nIf you have a Go environment:\r\n```bash\r\n$ go get -u -v github.com/flowerinthenight/athena2csv\r\n```\r\n\r\n## Run the tool\r\nRunning this tool will create an [S3 bucket](https://aws.amazon.com/s3/) `queryathena2csv-query-bucket`.\r\n\r\nRequired environment variables:\r\n\r\n```bash\r\n# The following should have at least Athena read and S3 read/write access.\r\nAWS_REGION={your-aws-region}\r\nAWS_ACCESS_KEY_ID={aws-key-id}\r\nAWS_SECRET_ACCESS_KEY={aws-secret}\r\n```\r\n\r\nIf your query string is quite long, you can write it in a file:\r\n```bash\r\n$ athena2csv --database aws-billing --query-file query.txt\r\n```\r\n\r\nIf your query is not that long, you can input directly in command line:\r\n```bash\r\n$ athena2csv --database aws-billing \"select \\\"identity/lineitemid\\\" \\\r\n      from \\\"aws_billing\\\".\\\"mobingilabs_aws_billing_formatted_development\\\" \\\r\n      limit 10\"\r\n```\r\n\r\nOutput file is downloaded to the current directory, named `output.csv`.\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflowerinthenight%2Fathena2csv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflowerinthenight%2Fathena2csv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflowerinthenight%2Fathena2csv/lists"}