Issue in SynapseML when connecting to Azure Form Recognizer

Ali Davoudian 61 Reputation points

I am using the following Python code in a SPARK Pool notebook in Azure Synapse Analytics in order to connect to the Azure Form Recognizer service:

from import *
cognitive_service_name = "CognitiveServiceFormRecognizer"
from pyspark.sql.functions import col, flatten, regexp_replace, explode, create_map, lit
emptyDf = spark.createDataFrame([("",)])

listCustomModels = (ListCustomModels()

.withColumn("modelIds", col("models.modelList.modelId"))

But it returns an empty list. However, when I connect to the Form Recognizer via rest API, it returns the list of all models.


I have already asked the question from the SynapseML Github ( No answer!!!!!

Please let me know, what should I do.
Another question: Is there any alternative for SynapseML in Synapse analytics?

Thanks for any help.

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,107 questions
Microsoft Configuration Manager
{count} votes