Databricks recommends reviewing these licenses to ensure compliance with any applicable terms. If models emerge in the future that perform better according to Databricks’s internal benchmarks, Databricks might change the model (and the list of applicable licenses provided on this page).
In Databricks Runtime 15.1 and above, this function is supported in Databricks notebooks, including notebooks that are run as a task in a Databricks workflow.
Syntax
ai_analyze_sentiment(content)
Arguments
content: A STRING expression, the text to be analyzed.
Returns
A STRING. The value is chosen from 'positive', 'negative', 'neutral', or 'mixed'. Returns null if the sentiment cannot be detected.
Examples
> SELECT ai_analyze_sentiment('I am happy');
positive
> SELECT ai_analyze_sentiment('I am sad');
negative