{"id":21425850,"url":"https://github.com/battleroid/es-export-csv","last_synced_at":"2025-06-13T10:09:48.599Z","repository":{"id":72731704,"uuid":"133055633","full_name":"Battleroid/es-export-csv","owner":"Battleroid","description":"Script to export ES query results to CSV","archived":false,"fork":false,"pushed_at":"2023-07-25T21:12:46.000Z","size":15,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-13T10:09:46.162Z","etag":null,"topics":["csv","elasticsearch","python","tooling"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Battleroid.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-05-11T15:16:36.000Z","updated_at":"2023-02-10T06:01:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"4656241c-c718-45ba-9738-f00d43051438","html_url":"https://github.com/Battleroid/es-export-csv","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Battleroid/es-export-csv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Battleroid%2Fes-export-csv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Battleroid%2Fes-export-csv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Battleroid%2Fes-export-csv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Battleroid%2Fes-export-csv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Battleroid","download_url":"https://codeload.github.com/Battleroid/es-export-csv/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Battleroid%2Fes-export-csv/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259624744,"owners_count":22886331,"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","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":["csv","elasticsearch","python","tooling"],"created_at":"2024-11-22T21:38:23.482Z","updated_at":"2025-06-13T10:09:48.553Z","avatar_url":"https://github.com/Battleroid.png","language":"Python","readme":"# es-export-csv\n\nThis will perform a basic match all query within the date math specific date range (against `@timestamp` field), returning results as a CSV file. By default returns as a match all type query, the query string can be specified however.\n\n## Usage\n\n```\nusage: es_export_csv.py [-h] [-q QUERY] [-t TOTAL] [-e HOST]\n                        [--from RANGE_FROM] [--to RANGE_TO] [-o OUTPUT]\n                        [--only-source] [--no-header] [-u USERNAME]\n                        [-p PASSWORD]\n                        index [fields [fields ...]]\n\npositional arguments:\n  index                 index to export\n  fields                limit output to fields (if set) or return all fields\n                        (default: None)\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -q QUERY, --query QUERY\n                        query_string to submit, empty (return everything) by\n                        default (default: None)\n  -t TOTAL, --total TOTAL\n                        max docs to return (default: 500)\n  -e HOST, --host HOST  cluster API (default: localhost:9200)\n  --from RANGE_FROM     range start (default: now-1d/d)\n  --to RANGE_TO         range end (default: now/d)\n  -o OUTPUT, --output OUTPUT\n                        output file (default: results.csv)\n  --only-source         only return source fields; exclude metadata fields\n                        (default: True)\n  --no-header           do not write csv header (default: False)\n  -u USERNAME, --username USERNAME\n                        basic auth username (default: cweed)\n  -p PASSWORD, --password PASSWORD\n                        basic auth password (default: None)\n```\n\n`--range-from` and `--range-to` accept [date math](https://www.elastic.co/guide/en/elasticsearch/reference/6.2/common-options.html#date-math) formatted strings. This should give you great flexibility in date range selection without knowing epochs.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbattleroid%2Fes-export-csv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbattleroid%2Fes-export-csv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbattleroid%2Fes-export-csv/lists"}