Skip to main content

ai_parse_document

Parses a column containing binary data (blob) and returns a VariantType. Throws an exception if the input blob is invalid.

Syntax

Python
from pyspark.databricks.sql import functions as dbf

dbf.ai_parse_document(col=<col>, options=<options>)

Parameters

Parameter

Type

Description

col

pyspark.sql.Column or binary data

A column or column name containing the binary blobs to parse.

options

dict, optional

A dictionary of options to control the parsing behavior.

Returns

pyspark.sql.Column: A new column of VariantType containing the document parse result.