{ "info": { "author": "Rick Keilty", "author_email": "rkeilty@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development" ], "description": "SQL Data Dependency Tool\n========================\n\nThe SQL Data Dependency Tool (``sqldd``) is a tookit used for analyzing dependencies between rows in a database. Given a table and a primary key, it recursively analyzes foreign keys to generate a map of all downstream tables and foreign keys the initial \"root row\" depends on.\n\nStatus\n======\n.. image:: https://travis-ci.org/rkeilty/sql-data-dependency.svg?branch=master\n :target: https://travis-ci.org/rkeilty/sql-data-dependency\n\nInstallation\n============\n\nThe ``sqldd`` module is `published on the Python Package\nIndex `__, so you can\ninstall it using ``pip`` or ``easy_install``.\n\n::\n\n pip install sqldd\n\nOr:\n\n::\n\n easy_install sqldd\n\nIt installs a ``sqldd`` module in the path for simple shell usage.\n\nUsage\n=====\n\nThe most common usage of the tool is from the shell with ``sqldd``.\n\nFor example, to find dependencies of row 53 in table A:\n::\n\n $: sqldd A 53 --database sqldd_db --pretty\n {\n \"A\": [\n 53\n ],\n \"D': [\n 1,\n 2,\n 20\n ],\n \"M': [\n 48\n ]\n }\n\nThis indicates that in the complete dependency tree for that row, tables ``D`` and ``M`` have rows that matter to foreign keys. This may not be a direct child dependency of ``A``, but possibly a sub-dependency (``A:53 --> D:1 --> M:48``)\n\nMultiple rows\n-------------\nFor more complex analysis, where one may want to look at multiple tables/rows, a JSON file can be specified with table names as keys, and values are arrays of primary keys.\n\n::\n\n {\n \"A\": [53],\n \"another_table\": [1, 4, 10],\n \"one_more_table\": [\"string_pk_1\", \"string_pk_2\"]\n }\n \nNow invoking will give more output:\n\n::\n\n $: sqldd --json input.json --database sqldd_db --pretty\n {\n \"A\": [53],\n \"D\": [1, 2, 20],\n \"M\": [48],\n \"P\": [800, 908],\n \"another_table\": [1, 4, 10, 22, 28],\n \"one_more_table\": [\"string_pk_1\", \"string_pk_2\", \"string_pk_4444\"]\n }\n\nDocker\n------\nA docker image of the tool is also available. It is invoked using ``docker run`` the same way as the pip command.\n\n::\n\n $: docker run --rm rkeilty/sqldd A 53 --database my_db --pretty\n {\n \"A\": [\n 53\n ],\n \"D': [\n 1,\n 2,\n 20\n ],\n \"M': [\n 48\n ]\n }\n\n\nOptions\n-------\n::\n \n usage: sqldd [-h] [--json JSON_FILE] [--server SERVER] [--port PORT]\n --database DATABASE [--username USERNAME] [--password PASSWORD]\n [--pretty] [--sqldump] [--sqldump_table_defs]\n [table] [primary_key]\n\n SQL Data Dependency Tool\n\n One of either ([table][primary_key]) or [--json] is required.\n\n positional arguments:\n table Table to analyze\n primary_key Primary key for row in table to analyze\n\n optional arguments:\n -h, --help show this help message and exit\n --json JSON_FILE File containing tables and rows to analyze\n --server SERVER Database server\n --port PORT Database port\n --database DATABASE Database name\n --username USERNAME Database username\n --password PASSWORD Database password\n --pretty Pretty print the output\n --sqldump Generate a sql dump file of all dependencies\n --sqldump_table_defs Dump _all_ table defs, even those without\n dependencies. Useful for constructing skeleton DBs.\n\n\nTodo\n====\n- Allow for traversing *up* from root rows, rather than just downstream dependencies.\n- Compound primary keys are not supported.\n- Restricted to MySQL, expand connection strings to allow *any* SQL compatible DB access.\n\nLicense\n=======\n\n``sqldd`` is licensed under the terms of the 3-clause BSD license.\n\nContributing\n============\n\nAll contributions are welcome, including but not limited to:\n\n- Documentation fixes / updates\n- New features (requests as well as implementations)\n- Bug fixes (see issues list)\n\nIf you encounter any errors in the code, please file an issue on github:\nhttps://github.com/rkeilty/sql-data-dependency/issues.\n\nAuthor\n======\n\n- Author: Rick Keilty\n- Email: rkeilty@gmail.com\n- Repository: http://github.com/rkeilty/sql-data-dependency\n\nVersion\n=======\n\n- Version: 1.0.0\n- Release Date: 2017-02-07\n\nRevision History\n================\n\nVersion 1.0.0\n-------------\n\n- Release Date: 2017-02-07\n- Changes:\n\n - Python 2/3 portability\n - Dockerized command\n - Basic tests\n - Simplified shell connections\n\nVersion 0.9.2\n-------------\n\n- Release Date: 2017-02-03\n- Changes:\n\n - Allow for older SQLAlchemy usage\n\nVersion 0.9.1\n-------------\n\n- Release Date: 2017-01-28\n- Changes:\n\n - Fix for mysqldump command check\n - Documentation updates\n\nVersion 0.9.0\n-------------\n\n- Release Date: 2017-01-27\n- Changes:\n\n - Initial release", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/rkeilty/sql-data-dependency", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "sqldd", "package_url": "https://pypi.org/project/sqldd/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/sqldd/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/rkeilty/sql-data-dependency" }, "release_url": "https://pypi.org/project/sqldd/1.0.0/", "requires_dist": null, "requires_python": null, "summary": "A toolkit for analyzing dependencies in SQL databases.", "version": "1.0.0" }, "last_serial": 2624350, "releases": { "0.9": [ { "comment_text": "", "digests": { "md5": "23b25834cabbdcaacede4d9b91b7e669", "sha256": "6c92057cf6b293960132952ada2a3cb5fa47d5b53d1483caf2707666d72ed624" }, "downloads": -1, "filename": "sqldd-0.9.tar.gz", "has_sig": false, "md5_digest": "23b25834cabbdcaacede4d9b91b7e669", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6831, "upload_time": "2017-01-27T13:58:40", "url": "https://files.pythonhosted.org/packages/e3/b5/6b907cce1366a07e9076b5100cd0f356be7d5e0fc59b8f2b7558a6814bae/sqldd-0.9.tar.gz" } ], "0.9.1": [ { "comment_text": "", "digests": { "md5": "1ad947c5771d32ebf1b1ed6a6af34c1c", "sha256": "c92c02c6058f1027f1526e12a790208032b1e92663cadca81c0e7518fb011c51" }, "downloads": -1, "filename": "sqldd-0.9.1.tar.gz", "has_sig": false, "md5_digest": "1ad947c5771d32ebf1b1ed6a6af34c1c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6915, "upload_time": "2017-01-28T15:28:38", "url": "https://files.pythonhosted.org/packages/56/b9/f3e059685c254f33b0fe616a00e15334daa07518e194ecad6b329f3ba4d1/sqldd-0.9.1.tar.gz" } ], "0.9.2": [ { "comment_text": "", "digests": { "md5": "55b49d2be79758821885f117936afad0", "sha256": "1ec196d9d503250f1daa413c7a57b93a9b4b5dedad564fc624ba28a4288872c1" }, "downloads": -1, "filename": "sqldd-0.9.2.tar.gz", "has_sig": false, "md5_digest": "55b49d2be79758821885f117936afad0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6963, "upload_time": "2017-02-03T19:21:03", "url": "https://files.pythonhosted.org/packages/0f/96/088fa10716812928b5388df614afdac9ad613819f032e81e5845cd48aaf6/sqldd-0.9.2.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "7c3b2d02f6f079c9723a71070398c701", "sha256": "f16197bbf32ec55ecda3c5e98b190705a7d4a9fde606094d25eaac1238ae70cd" }, "downloads": -1, "filename": "sqldd-1.0.0.tar.gz", "has_sig": false, "md5_digest": "7c3b2d02f6f079c9723a71070398c701", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14035, "upload_time": "2017-02-07T06:22:07", "url": "https://files.pythonhosted.org/packages/44/b2/852ef9f7bbf7c4b2c78a8b3842451889b785229569abebf9765498e60d4c/sqldd-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7c3b2d02f6f079c9723a71070398c701", "sha256": "f16197bbf32ec55ecda3c5e98b190705a7d4a9fde606094d25eaac1238ae70cd" }, "downloads": -1, "filename": "sqldd-1.0.0.tar.gz", "has_sig": false, "md5_digest": "7c3b2d02f6f079c9723a71070398c701", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14035, "upload_time": "2017-02-07T06:22:07", "url": "https://files.pythonhosted.org/packages/44/b2/852ef9f7bbf7c4b2c78a8b3842451889b785229569abebf9765498e60d4c/sqldd-1.0.0.tar.gz" } ] }