{ "info": { "author": "Hrvoje Milkovic", "author_email": "hrvoje@krakensystems.co", "bugtrack_url": null, "classifiers": [], "description": "## Replication PostreSQL to Elasticsearch via Logical replication slots\n\n\n### Install\n\n```\n$ pip install pg-replicate-elastic\n```\n\n#### wal2json\n\n*Note:* Use my fork as we tested it to be 100% sure it work with it and no breaking changes happen, [wal2json](https://github.com/hmilkovi/wal2json) .\n\n```\n$ git clone https://github.com/hmilkovi/wal2json.git\n$ PATH=/path/to/bin/pg_config:$PATH\n$ USE_PGXS=1 make\n$ USE_PGXS=1 make install\n```\n\nYou need to set up at least two parameters at postgresql.conf:\n```\nwal_level = logical\nmax_replication_slots = 1\n```\nAfter changing these parameters, a restart is needed.\n\n### Usage\n\n```\npg_replicate_elastic --config=\n```\n\nConstruct configuration file in json format where:\n\n* **replication_slot** json object for replication slot name and if is temporary\n* **tables** is array of tables we want to replicate\n* **es_connection** connection string to Elasticsearch\n* **postgres** json object for PostreSQL connection\n* **inital_sync** boolean for inital syncronization that needs to be done first time\nto replicate old data\n\nExample configuration\n```\n{\n\t\"replication_slot\": {\n\t\t\"name\": \"elasticsearch_slot\",\n\t\t\"is_temp\": true\n\t},\n\t\"tables\": [{\n\t\t\"name\": \"poc\",\n\t\t\"primary_key\": \"a\"\n\t\t\"exclude_columns\": \"c,z\"\n\t}],\n\t\"es_connection\": \"http://127.0.0.1:9200/\",\n\t\"postgres\": {\n\t\t\"port\": 5432,\n\t\t\"host\": \"127.0.0.1\",\n\t\t\"database\": \"poc\",\n\t\t\"username\": \"test\",\n\t\t\"password\": \"test\"\n\t},\n\t\"inital_sync\": false\n}\n```\n\n### Note\n\nwal2json is not my software so for licence check [their licence](https://raw.githubusercontent.com/hmilkovi/wal2json/master/LICENSE)\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://git.krakensystems.co/KrakenSystems/pg-replicate-elastic", "keywords": "postgresql,elasticsearch,replication", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pg-replicate-elastic", "package_url": "https://pypi.org/project/pg-replicate-elastic/", "platform": "", "project_url": "https://pypi.org/project/pg-replicate-elastic/", "project_urls": { "Homepage": "https://git.krakensystems.co/KrakenSystems/pg-replicate-elastic" }, "release_url": "https://pypi.org/project/pg-replicate-elastic/1.0.3/", "requires_dist": [ "docopt (==0.6.2)", "elasticsearch (==6.1.1)", "et-xmlfile (==1.0.1)", "jdcal (==1.3)", "odfpy (==1.3.6)", "openpyxl (==2.5.0)", "psycopg2 (==2.7.4)", "psycopg2-binary (==2.7.4)", "python-dateutil (==2.6.1)", "PyYAML (==3.12)", "records (==0.5.2)", "six (==1.11.0)", "SQLAlchemy (==1.2.2)", "tablib (==0.12.1)", "unicodecsv (==0.14.1)", "urllib3 (==1.22)", "xlrd (==1.1.0)", "xlwt (==1.3.0)" ], "requires_python": "", "summary": "Replication PostreSQL to Elasticsearch via Logical replication slots", "version": "1.0.3" }, "last_serial": 3820738, "releases": { "1.0.3": [ { "comment_text": "", "digests": { "md5": "6095cbc57a5bb797bdef00bb50c5d15c", "sha256": "5343ea630030dcbcda4c24fc0fc408cf15de2c1792e54f3d2f1d002039f1677a" }, "downloads": -1, "filename": "pg_replicate_elastic-1.0.3-py2-none-any.whl", "has_sig": false, "md5_digest": "6095cbc57a5bb797bdef00bb50c5d15c", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 5571, "upload_time": "2018-04-30T12:40:35", "url": "https://files.pythonhosted.org/packages/77/66/f5699e89037913f07e642f61b997d76402a82af5afcd943dde27ae04efa0/pg_replicate_elastic-1.0.3-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e21e459cc0f9c5e93a7f5fe66fbd62ef", "sha256": "908a25aff2ce65c05dff60510142b4ac24b3b7ac1597fb238b9465e80f654c6f" }, "downloads": -1, "filename": "pg-replicate-elastic-1.0.3.tar.gz", "has_sig": false, "md5_digest": "e21e459cc0f9c5e93a7f5fe66fbd62ef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4984, "upload_time": "2018-04-30T12:40:36", "url": "https://files.pythonhosted.org/packages/11/e3/a82597fdde02b2ed9ea85c834073274cd9e5e4e65aea4c066b4e4bf54859/pg-replicate-elastic-1.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6095cbc57a5bb797bdef00bb50c5d15c", "sha256": "5343ea630030dcbcda4c24fc0fc408cf15de2c1792e54f3d2f1d002039f1677a" }, "downloads": -1, "filename": "pg_replicate_elastic-1.0.3-py2-none-any.whl", "has_sig": false, "md5_digest": "6095cbc57a5bb797bdef00bb50c5d15c", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 5571, "upload_time": "2018-04-30T12:40:35", "url": "https://files.pythonhosted.org/packages/77/66/f5699e89037913f07e642f61b997d76402a82af5afcd943dde27ae04efa0/pg_replicate_elastic-1.0.3-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e21e459cc0f9c5e93a7f5fe66fbd62ef", "sha256": "908a25aff2ce65c05dff60510142b4ac24b3b7ac1597fb238b9465e80f654c6f" }, "downloads": -1, "filename": "pg-replicate-elastic-1.0.3.tar.gz", "has_sig": false, "md5_digest": "e21e459cc0f9c5e93a7f5fe66fbd62ef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4984, "upload_time": "2018-04-30T12:40:36", "url": "https://files.pythonhosted.org/packages/11/e3/a82597fdde02b2ed9ea85c834073274cd9e5e4e65aea4c066b4e4bf54859/pg-replicate-elastic-1.0.3.tar.gz" } ] }