Databricks connector



Set up LabelSpark with the following lines of code:

%pip install labelspark -q
import labelspark as ls

api_key = "" # Insert your Labelbox API key here
client = ls.Client(api_key)

Once set up, you can run the following core functions:

  • client.create_data_rows_from_table() : Creates Labelbox data rows (and metadata) given a Spark Table DataFrame

  • client.export_to_table() : Exports labels (and metadata) from a given Labelbox project and creates a Spark DataFrame

Import data

Basics: Data rows from URLsOpen in Github
Data rows with metadataOpen in Github
Data rows with attachmentsOpen in Github
Data rows with annotationsOpen in Github
Putting it all togetherOpen in Github

Export Data

Export data to a spark tableOpen in Github

While using LabelSpark, you will likely also use the Labelbox SDK (e.g. for programmatic ontology creation). These resources will help familiarize you with the Labelbox Python SDK: