{"id":37019576,"url":"https://github.com/vivekkothari/data-river","last_synced_at":"2026-01-14T02:10:50.705Z","repository":{"id":48052790,"uuid":"65538223","full_name":"vivekkothari/data-river","owner":"vivekkothari","description":"Replicates data from mysql to any datastore of your choice (relies on maxwell)","archived":false,"fork":false,"pushed_at":"2023-11-22T20:58:13.000Z","size":59,"stargazers_count":1,"open_issues_count":1,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-06T07:48:14.166Z","etag":null,"topics":["data-river","dropwizard-application","maxwell","mysql","replicate-data"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vivekkothari.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}},"created_at":"2016-08-12T08:45:36.000Z","updated_at":"2025-03-27T05:59:14.000Z","dependencies_parsed_at":"2023-01-29T23:45:57.934Z","dependency_job_id":null,"html_url":"https://github.com/vivekkothari/data-river","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/vivekkothari/data-river","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vivekkothari%2Fdata-river","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vivekkothari%2Fdata-river/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vivekkothari%2Fdata-river/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vivekkothari%2Fdata-river/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vivekkothari","download_url":"https://codeload.github.com/vivekkothari/data-river/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vivekkothari%2Fdata-river/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"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":["data-river","dropwizard-application","maxwell","mysql","replicate-data"],"created_at":"2026-01-14T02:10:50.074Z","updated_at":"2026-01-14T02:10:50.690Z","avatar_url":"https://github.com/vivekkothari.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# data-river [![Build Status](https://travis-ci.org/vivekkothari/data-river.svg?branch=master)](https://travis-ci.org/vivekkothari/data-river) [![Coverage Status](https://coveralls.io/repos/github/vivekkothari/data-river/badge.svg?branch=master)](https://coveralls.io/github/vivekkothari/data-river?branch=master)\n\nReplicates data from mysql to any datastore of your choice (relies on maxwell)\n\n### Maven Dependency\n\n* Use the following maven dependency:\n\n```\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.vivekkothari\u003c/groupId\u003e\n    \u003cartifactId\u003eelastic-search-persister\u003c/artifactId\u003e\n    \u003cversion\u003e1.2.1\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nImagine you have 2 tables in MySql, `Table1` and `Table2`. You would have to\nconfigure [maxwell](http://maxwells-daemon.io). Once maxwell is properly configured, lets say you\nwant to persist changes in the above tables in [Elastic-Search](https://www.elastic.co). We would\ncreate 2 rivers, `table1_river` and `table2_river`. Then for each of these `riverType`, provide\nimplementation of `IFilter`, `IEnricher` and `IBackFiller` and build a\n[`TransformerFactory`](https://github.com/vivekkothari/data-river/blob/master/data-river-core/src/main/java/com/github/vivekkothari/river/service/TransformerFactory.java)\n\nIncoming kafka message goes through following 3 steps:\n\n1.\nFiltering: [`IFilter`](https://github.com/vivekkothari/data-river/blob/master/data-river-core/src/main/java/com/github/vivekkothari/river/service/IFilter.java)\ngoverns whether the incoming message should be processed or not.\n2.\nEnrichment: [`IEnricher`](https://github.com/vivekkothari/data-river/blob/master/data-river-core/src/main/java/com/github/vivekkothari/river/service/IEnricher.java)\nprovides a way to enrich the incoming message. (think of joining the row with some other row)\n3.\nPersistence: [`IPersister`](https://github.com/vivekkothari/data-river/blob/master/data-river-core/src/main/java/com/github/vivekkothari/river/service/IPersister.java)\npersists the message in your desired data store.\n\nThere is also and admin task on the admin port of your dropwizard application which can be used to\nbackfill the data. Example\n\n```\nhttp://localhost:8080/admin/backfill?startDate=2016-01-01T00:00:00\u0026endDate=2016-01-10T00:00:00\u0026riverType=river1\n```\n\nAdd following code in the `run` method of you dropwizard application.\nAdd `com.github.vivekkothari.persister.ESRiverConfiguration` in your `Configuration` class Configure\nappropriately (like Elasticsearch hosts, bulk index configs etc.) then call following method.\n\n```\nconfiguration.getEsRiverConfiguration().build(environment);\n```\n\nThe `IPersister` can be extended and you can add a new data store to which the messages can be\nstored.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvivekkothari%2Fdata-river","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvivekkothari%2Fdata-river","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvivekkothari%2Fdata-river/lists"}