{"id":15284114,"url":"https://github.com/memsjava/bigquery-helper","last_synced_at":"2025-08-01T20:09:30.916Z","repository":{"id":255343358,"uuid":"849328238","full_name":"memsjava/bigquery-helper","owner":"memsjava","description":"A helper package for Google BigQuery operations","archived":false,"fork":false,"pushed_at":"2024-08-29T12:27:01.000Z","size":8,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-17T04:17:21.544Z","etag":null,"topics":["bigquery","google","pandas-dataframe"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/bigquery-helper/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/memsjava.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-08-29T12:01:54.000Z","updated_at":"2024-08-30T11:08:47.000Z","dependencies_parsed_at":"2024-08-29T12:10:39.170Z","dependency_job_id":"b63803e2-1e46-48e9-82b2-b78c4148a69c","html_url":"https://github.com/memsjava/bigquery-helper","commit_stats":null,"previous_names":["memsjava/bigquery-helper"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/memsjava/bigquery-helper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memsjava%2Fbigquery-helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memsjava%2Fbigquery-helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memsjava%2Fbigquery-helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memsjava%2Fbigquery-helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/memsjava","download_url":"https://codeload.github.com/memsjava/bigquery-helper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memsjava%2Fbigquery-helper/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268290738,"owners_count":24226646,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"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":["bigquery","google","pandas-dataframe"],"created_at":"2024-09-30T14:49:43.536Z","updated_at":"2025-08-01T20:09:30.876Z","avatar_url":"https://github.com/memsjava.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BigQuery Helper\n\nBigQuery Helper is a Python package that simplifies working with Google BigQuery. It provides an easy-to-use interface for common BigQuery operations such as executing queries, inserting rows, and working with DataFrames.\n\n## Installation\n\nYou can install BigQuery Helper using pip:\n\n```\npip install bigquery-helper\n```\n\n## Usage\n\nTo use BigQuery Helper, you'll need a Google Cloud project and credentials. Here's how to get started:\n\n1. Set up a Google Cloud project and enable the BigQuery API.\n2. Create a service account and download the JSON key file.\n3. Set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable to the path of your JSON key file:\n\n   ```\n   export GOOGLE_APPLICATION_CREDENTIALS=\"/path/to/your/keyfile.json\"\n   ```\n\n   Alternatively, you can pass the credentials directly when initializing the BigQueryHelper.\n\nHere's a quick example of how to use BigQuery Helper:\n\n```python\nfrom bigquery_helper import BigQueryHelper\n\n# Initialize BigQueryHelper\nbq_helper = BigQueryHelper(project_id=\"your-project-id\", credentials=\"/path/to/your/keyfile.json\")\n\n# Execute a query and get results as a DataFrame\nquery = \"SELECT * FROM `your_dataset.your_table` LIMIT 10\"\ndf = bq_helper.query_to_dataframe(query)\nprint(df)\n\n# Insert rows into a table\nrows_to_insert = [\n    {\"column1\": \"value1\", \"column2\": 123},\n    {\"column1\": \"value2\", \"column2\": 456}\n]\nbq_helper.insert_rows(\"your_dataset.your_table\", rows_to_insert)\n\n# Upload a DataFrame to BigQuery\nimport pandas as pd\ndf_to_upload = pd.DataFrame({\"column1\": [\"a\", \"b\"], \"column2\": [1, 2]})\nbq_helper.dataframe_to_table(df_to_upload, \"your_dataset.new_table\", if_exists=\"replace\")\n\n# Update a column in a table\nbq_helper.update_column(\"your_dataset.your_table\", \"id_column\", \"status_column\", [1, 2, 3])\n\n# Get schema of a table\nschema = bq_helper.get_schema(\"your_dataset.your_table\")\nprint(schema)\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmemsjava%2Fbigquery-helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmemsjava%2Fbigquery-helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmemsjava%2Fbigquery-helper/lists"}