dosubot[bot] commented on issue #38420:
URL: https://github.com/apache/superset/issues/38420#issuecomment-4001527024

   <!-- Answer -->
   You're right—the TEXT format option is intentionally restricted in the UI. 
Looking at the [AlertReportModal.tsx 
code](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/features/alerts/AlertReportModal.tsx#L1763-L1778),
 the format options work like this:
   
   - **Dashboards**: Only PDF and PNG (no TEXT or CSV)
   - **Charts**: PDF, PNG, CSV for most chart types
   - **TEXT format**: Only available for [text-based visualization 
types](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/features/alerts/AlertReportModal.tsx#L90-L94):
 `PivotTable`, `table`, and `PairedTTest`
   
   So if your chart isn't one of those table-based types, the TEXT option won't 
appear. This is a limitation for webhook integrations like Mattermost that 
can't handle file attachments.
   
   As a workaround, you could potentially use the API directly to set 
`report_format: "TEXT"` (bypassing the UI validation), though I'm not certain 
the backend would properly handle that for non-table charts. It might be worth 
filing a feature request to expose TEXT format for all content types when 
webhook is the notification target.
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/bccb0be3-d02d-433c-baa4-522255a0a4af?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/bccb0be3-d02d-433c-baa4-522255a0a4af?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/bccb0be3-d02d-433c-baa4-522255a0a4af?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/bccb0be3-d02d-433c-baa4-522255a0a4af?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/bccb0be3-d02d-433c-baa4-522255a0a4af?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/bccb0be3-d02d-433c-baa4-522255a0a4af?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/bccb0be3-d02d-433c-baa4-522255a0a4af?feedback_type=other)</sup>
   
   [![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=You%27re%20right%E2%80%94the%20TEXT%20format%20option%20is%20intentionally%20restricted%20in%20the%20UI.%20Looking%20at%20the%20%5BAlertReportModal.tsx%20code%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/features/alerts/AlertReportModal.tsx%23L1763-L1778%29%2C%20the%20format%20options%20work%20like%20this%3A%0A%0A-%20%2A%2ADashboards%2A%2A%3A%20Only%20PDF%20and%20PNG%20%28no%20TEXT%20or%20CSV%29%0A-%20%2A%2ACharts%2A%2A%3A%20PDF%2C%20PNG%2C%20CSV%20for%20most%20chart%20types%0A-%20%2A%2ATEXT%20format%2A%2A%3A%20Only%20available%20for%20%5Btext-based%20visualization%20types%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/fea
 
tures/alerts/AlertReportModal.tsx%23L90-L94%29%3A%20%60PivotTable%60%2C%20%60table%60%2C%20and%20%60PairedTTest%60%0A%0ASo%20if%20your%20chart%20isn%27t%20one%20of%20those%20table-based%20types%2C%20the%20TEXT%20option%20won%27t%20appear.%20This%20is%20a%20limitation%20for%20webhook%20integrations%20like%20Mattermost%20that%20can%27t%20handle%20file%20attachments.%0A%0AAs%20a%20workaround%2C%20you%20could%20potentially%20use%20the%20API%20directly%20to%20set%20%60report_format%3A%20%22TEXT%22%60%20%28bypassing%20the%20UI%20validation%29%2C%20though%20I%27m%20not%20certain%20the%20backend%20would%20properly%20handle%20that%20for%20non-table%20charts.%20It%20might%20be%20worth%20filing%20a%20feature%20request%20to%20expose%20TEXT%20format%20for%20all%20content%20types%20when%20webhook%20is%20the%20notification%20target.)&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on X](https://img.
 
shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/38420)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to