Databricks connector

Requirements

Setup

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

TutorialGithub
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

TutorialGithub
Export data to a spark tableOpen in Github

LabelSpark is best used in conjunction with the Labelbox Python SDK ; the following resources can help: