{ "info": { "author": "Bal\u00e1zs M\u00e1t\u00e9", "author_email": "matepaavo@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5" ], "description": "# bq-utils - A collection of BigQuery utilities\nCurrently the utilities covered in this library are limited to managing table and view descriptions.\nIt's quite useful to have the field descriptions available on \nthe schema tab and on the query editor pane on the BigQuery UI and this library helps you with uploading them and copying them around.\n## Install\n```bash\npip install bq-utils\n```\n## Python\n### Copy descriptions between tables and views\n```python\nfrom google.cloud import bigquery\nfrom bqutils.bigquery_description_manager import BigQueryDescriptionManager\n\nbq_client = bigquery.Client()\ndescription_manager = BigQueryDescriptionManager(bq_client)\nsource_table_id = 's_project.s_dataset.s_table'\ntarget_table_id = 't_project.t_dataset.t_table'\ndescription_manager.copy_field_descriptions(source_table_id, target_table_id)\n```\n\n### Upload descriptions from csv\n```python\nfrom google.cloud import bigquery\nfrom bqutils.bigquery_description_manager import BigQueryDescriptionManager\n\nbq_client = bigquery.Client()\ndescription_manager = BigQueryDescriptionManager(bq_client)\ndescriptions_csv_path = 'table_descriptions.csv'\ntarget_table_id = 't_project.t_dataset.t_table'\ndescription_manager.upload_field_descriptions(descriptions_csv_path, target_table_id)\n```\n\n## Command line\n### Usage\n```bash\nusage: __main__.py [-h] [--source SOURCE] --target TARGET\n [--csv_path CSV_PATH] [--debug]\n {desccopy,descupload}\n\nCopy or upload field descriptions for BigQuery tables/views\n\npositional arguments:\n {desccopy,descupload}\n\noptional arguments:\n -h, --help show this help message and exit\n --source SOURCE fully-qualified source table ID\n --target TARGET fully-qualified target table ID\n --csv_path CSV_PATH path for the csv file\n --debug set debug mode on, default is false\n```\n### Copy descriptions between tables and views\n```bash\npython -m bqutils desccopy --source s_project.s_dataset.s_table --target t_project.t_dataset.t_table\n```\n\n### Upload descriptions from csv\n```bash\npython -m bqutils descupload --csv_path table_descriptions.csv --target t_project.t_dataset.t_table\n```\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://github.com/matepaavo/bq-utils", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "bq-utils", "package_url": "https://pypi.org/project/bq-utils/", "platform": "", "project_url": "https://pypi.org/project/bq-utils/", "project_urls": { "Homepage": "https://github.com/matepaavo/bq-utils" }, "release_url": "https://pypi.org/project/bq-utils/0.1.0/", "requires_dist": [ "google-cloud-bigquery" ], "requires_python": "", "summary": "A collection of BigQuery utilities", "version": "0.1.0" }, "last_serial": 4694115, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "aa8bb853bdb4504d359277f3bbdfb260", "sha256": "4151041e272aa1d9e7b7cebb9c9330731f6ca11ba682b5bb0e48959d8c6dacbf" }, "downloads": -1, "filename": "bq_utils-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "aa8bb853bdb4504d359277f3bbdfb260", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5289, "upload_time": "2019-01-14T13:25:35", "url": "https://files.pythonhosted.org/packages/fe/c4/d0295370a8cf5c94e6f34ecbfe77df39c61d81e9f53f75cd4de7051e3798/bq_utils-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "065c9805947e2f7caf9455cc64d1a491", "sha256": "33f8a987a3d57d91f92436fcf3a287a9ffffab85dea0a17bfacfe40b8313ae72" }, "downloads": -1, "filename": "bq-utils-0.1.0.tar.gz", "has_sig": false, "md5_digest": "065c9805947e2f7caf9455cc64d1a491", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3584, "upload_time": "2019-01-14T13:25:38", "url": "https://files.pythonhosted.org/packages/1f/9d/e63431aa99457373407b60ce4ea6e77e01ba50c4cbbf40dbbdea2ce8d2a3/bq-utils-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "aa8bb853bdb4504d359277f3bbdfb260", "sha256": "4151041e272aa1d9e7b7cebb9c9330731f6ca11ba682b5bb0e48959d8c6dacbf" }, "downloads": -1, "filename": "bq_utils-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "aa8bb853bdb4504d359277f3bbdfb260", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5289, "upload_time": "2019-01-14T13:25:35", "url": "https://files.pythonhosted.org/packages/fe/c4/d0295370a8cf5c94e6f34ecbfe77df39c61d81e9f53f75cd4de7051e3798/bq_utils-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "065c9805947e2f7caf9455cc64d1a491", "sha256": "33f8a987a3d57d91f92436fcf3a287a9ffffab85dea0a17bfacfe40b8313ae72" }, "downloads": -1, "filename": "bq-utils-0.1.0.tar.gz", "has_sig": false, "md5_digest": "065c9805947e2f7caf9455cc64d1a491", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3584, "upload_time": "2019-01-14T13:25:38", "url": "https://files.pythonhosted.org/packages/1f/9d/e63431aa99457373407b60ce4ea6e77e01ba50c4cbbf40dbbdea2ce8d2a3/bq-utils-0.1.0.tar.gz" } ] }