Google PubSub for DLT - Error
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2024 05:26 AM
I'm trying to create a delta live table from a Google PubSub stream.
Unfortunately I'm getting the following error:
org.apache.spark.sql.streaming.StreamingQueryException: [PS_FETCH_RETRY_EXCEPTION] Task in pubsub fetch stage cannot be retried. Partition 0.3 in stage 3.0, TID 14. SQLSTATE: 22000
My code is below. What could explain this error and how can it be solved?
authOptions = {
"clientId" : "XXX",
"clientEmail" : "XXX",
"privateKey" : "-----BEGIN PRIVATE KEY-----\nXXX-----END PRIVATE KEY-----\n",
"privateKeyId" : "XXX"
}
stream=spark.readStream \
.format("pubsub") \
.option("subscriptionId","XXX") \
.option("topicId","XXX") \
.option("projectId","XXX") \
.options(**authOptions) \
.load()
Labels:
- Labels:
-
Spark
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2024 12:59 AM
Hi @Retired_mod, it was indeed a permissions issue. Nevertheless, I must admit that the error message is slightly misleading.
Thanks.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2024 12:05 PM
Hi @itamarwe, what was the missing permissions ?
Thanks.

