{"id":37148975,"url":"https://github.com/farovictor/mongodbextractor","last_synced_at":"2026-01-14T17:35:46.467Z","repository":{"id":197860615,"uuid":"699511878","full_name":"farovictor/MongoDbExtractor","owner":"farovictor","description":"This project is intended to be used as a data extractor to support ELT pipelines or any kind of process that requires a heavy data dump from MongoDb databases.","archived":false,"fork":false,"pushed_at":"2023-10-06T00:24:41.000Z","size":14,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T01:16:55.634Z","etag":null,"topics":["data","go","mongodb","pipeline"],"latest_commit_sha":null,"homepage":"","language":"Go","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/farovictor.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2023-10-02T19:25:19.000Z","updated_at":"2023-10-06T19:35:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"77bca788-3f2e-4e39-815c-25d184fd304f","html_url":"https://github.com/farovictor/MongoDbExtractor","commit_stats":null,"previous_names":["farovictor/mongodbextractor"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/farovictor/MongoDbExtractor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farovictor%2FMongoDbExtractor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farovictor%2FMongoDbExtractor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farovictor%2FMongoDbExtractor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farovictor%2FMongoDbExtractor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/farovictor","download_url":"https://codeload.github.com/farovictor/MongoDbExtractor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farovictor%2FMongoDbExtractor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28428717,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T16:38:47.836Z","status":"ssl_error","status_checked_at":"2026-01-14T16:34:59.695Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["data","go","mongodb","pipeline"],"created_at":"2026-01-14T17:35:45.775Z","updated_at":"2026-01-14T17:35:46.457Z","avatar_url":"https://github.com/farovictor.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Usage\nThis tool can be used as a package or cli tool.\nIt serves as a data extractor to support ELT pipelines or any kind of process that requires a heavy data dump.\n\n## CLI\n\nThis package allows the user to dump data into multiple json files.\n\n### Ping database\nThe `ping` command does a ping in database and returns a connection check.\n\n\n```bash\nmongoextract ping --conn-uri \"$MONGO_CONN_URI\"\n```\n\n### Check if a collection exists\nThe `collxst` command does a ping in database and returns a connection check.\n\n\n```bash\nmongoextract collxst \\\n\t--conn-uri \"$MONGO_CONN_URI\" \\\n\t--db-name \"$MONGO_DBNAME\" \\\n\t--collection \"$MONGO_COLLECTION\" \\\n\t--app-name \"$APPNAME\"\n```\n\n\n### Extract in batches - dumping streaming (async)\nThe `extract-batch` command iterates over mongo cursor and dumps chunks of data into json files.\n\n\n```bash\nmongoextract extract-batch \\\n\t\t--conn-uri \"$MONGO_CONN_URI\" \\\n\t\t--db-name \"$MONGO_DBNAME\" \\\n\t\t--collection \"$MONGO_COLLECTION\" \\\n\t\t--app-name \"$APPNAME\" \\\n\t\t--mapping $ID_NAME \\\n\t\t--query '{\"latitude\":{\"$$gte\":30}}' \\\n\t\t--output-path \"./data\" \\\n\t\t--output-prefix $ID_NAME \\\n\t\t--chunk-size 100 \\\n\t\t--num-concurrent-files 10\n```\n\n### Extract data\nThe `extract` command fetches a mongo cursor and dumps the whole data into a json file.\n\n\n```bash\nmongoextract extract \\\n\t--conn-uri \"$MONGO_CONN_URI\" \\\n\t--db-name \"$MONGO_DBNAME\" \\\n\t--collection \"$MONGO_COLLECTION\" \\\n\t--app-name \"$APPNAME\" \\\n\t--mapping some_mapping_name \\\n\t--query '{\"latitude\":{\"$$gte\":30}}'\n```\n\n\n## Releases\nAll releases are documented in [CHANGELOG](CHANGELOG.md), please check there for more details.\n\n\n### Docker\nAll releases are containerized and available [here](https://hub.docker.com/r/victorfaro/mongoextract)\nTo pull the latest version, execute the following command:\n\n```bash\ndocker pull victorfaro/mongoextract:latest\n```\n\nAll images uses the cli as entrypoint, check the above examples to see how to use it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffarovictor%2Fmongodbextractor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffarovictor%2Fmongodbextractor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffarovictor%2Fmongodbextractor/lists"}