Loading Academy Hub...
Integrate generative AI at enterprise scale into big data pipelines: Azure OpenAI endpoints, private VNET routing, SynapseML distributed enrichment, text-embedding-3-large generation, and managing HTTP 429 TPM/RPM rate limits.
[!NOTE] Modern enterprise data engineering goes beyond SQL transforms to incorporate foundation LLMs for unstructured data enrichment. Using SynapseML (formerly MMLSpark), data engineers can dispatch OpenAI embedding and completion requests across a distributed Apache Spark cluster in parallel.
mapPartitions.429 Retry-After. For deterministic batch SLAs, either route batch workloads across multi-region Azure API Management (APIM) load balancers + Batch API (24h SLA, 50% cost cut) or reserve Provisioned Throughput Units (PTUs) for latency-critical serving.text-embedding-3-large vectors) + BM25 lexical keywords + semantic reranking in Azure AI Search, indexing incremental changes directly via the Azure AI Search ADLS / OneLake Indexer or Databricks Delta sync.DefaultAzureCredential) and documented abuse-monitoring opt-out when processing regulated PII/PHI.Review the production code, company interview Q&As, incident traces, and comprehension quiz inside this lesson.
import synapse.ml.core
from synapse.ml.services.openai import OpenAIEmbedding
from pyspark.sql.functions import col
# Configure distributed OpenAI embedding transformer
openai_embedder = OpenAIEmbedding() \
.setSubscriptionKey(dbutils.secrets.get(scope="akv-prod", key="openai-api-key")) \
.setDeploymentName("text-embedding-3-large") \
.setCustomServiceName("https://aoai-lakehouse-prod.openai.azure.com/") \
.setTextCol("customer_complaint_text") \
.setOutputCol("vector_embedding") \
.setBatchSize(100) \
.setErrorCol("openai_error")
# Read Silver Lakehouse Delta table
bronze_df = spark.read.table("lakehouse_silver.support_tickets").filter(col("vector_embedding").isNull())
# Distributed transformation executed across Spark executor pool
embedded_df = openai_embedder.transform(bronze_df)
embedded_df.write.format("delta").mode("append").saveAsTable("lakehouse_gold.vector_indexed_tickets")synapse.ml.services.openai.OpenAIException: HTTP 429: Requests-per-minute quota exceeded for deployment 'text-embedding-3-large'.