Warning
Starting in July 2024, we will begin achieving all data connector libraries were they will no longer be maintained, including labelspark
, labelpandas
, labelsnow
, and labelbox-bigquery
libraries.
To import data from remote sources such as Databricks and Snowflake, set up Census integrations directly on the Labelbox platform.
Access the Labelbox Connector for Google BigQuery to easily perform the following functionalities:
lbbq.client.create_data_rows_from_table
: Creates Labelbox data rows (and metadata) given a BigQuery tablelbbq.client.create_table_from_dataset
: Creates a BigQuery table given a Labelbox datasetlbbq.client.upsert_table_metadata
: Updates BigQuery table metadata columns given a Labelbox datasetlbbq.client.upsert_labelbox_metadata
: Updates Labelbox metadata given a BigQuery table
The Demo code supplied in this Github is designed to run in a Google Colab, but the code can be adapted to any notebook environment.
Labelbox is the enterprise-grade training data solution with fast AI enabled labeling tools, labeling automation, human workforce, data management, a powerful API for integration & SDK for extensibility. Visit Labelbox for more information.
This library is currently in beta. It may contain errors or inaccuracies and may not function as well as commercially released software. Please report any issues/bugs via Github Issues.
- Google Cloud BigQuery Authenticated Client
- Google BigQuery SDK
- Labelbox account
- Generate a Labelbox API key
Install Labelbox-BigQuery to your Python environment. The installation will also add the Labelbox SDK and BigQuery SDK.
pip install labelboxbigquery
import labelboxbigquery
The client
class requires the following arguments:
lb_api_key
= Labelbox API Keygoogle_key
= Google Service Account Permissions dict, how to create one heregoogle_project_name
= Google Project ID / Name
To enhance the software supply chain security of Labelbox's users, as of 0.1.8, every release contains a SLSA Level 3 Provenance document.
This document provides detailed information about the build process, including the repository and branch from which the package was generated.
By using the SLSA framework's official verifier, you can verify the provenance document to ensure that the package is from a trusted source. Verifying the provenance helps confirm that the package has not been tampered with and was built in a secure environment.
Example of usage for the 0.1.8 release wheel:
VERSION=0.1.8 #tag
gh release download ${VERSION} --repo Labelbox/labelbox-bigquery
slsa-verifier verify-artifact --source-branch main --builder-id 'https://github.com/slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@refs/tags/v2.0.0' --source-uri "git+https://github.com/Labelbox/labelbox-bigquery" --provenance-path multiple.intoto.jsonl ./labelboxbigquery-${VERSION}-py3-none-any.whl