Embed database credentials in Tableau
If you are using a live data connection for your Tableau Server views, then Metric Insights might not be able to pull data. Tableau server might return an HTTP 406 error from a data pull (CSV export), or an HTTP 500 error from an image pull (PNG export).
In this case, the best practice is to Embed Database Credentials for your data source when you publish your Tableau workbook.
1. Embedding Database Credentials in Tableau Server
By default, views connected to live data require users to log in to the data source with a database username and password. If you discover that Metric Insights is unable to pull data from these views then the problem is most likely the live data is requiring a separate set of credentials to access. You can get around this if you configure Tableau Server to embed these database credentials, so that Metric Insights can pass through the login process and go directly to the view.
See http://kb.tableausoftware.com/articles/knowledgebase/embedding-database-credentials-tableau-server for information on how to embed database credentials in Tableau Server.
2. Web browser message when Tableau Server requires password to access View
One way you will know that you should embed database credentials for a view is when you access that view for the first time with web browser in Tableau Server. You get a message that prompts you to enter the database credentials.
3. Confirming an embedded database credentials problem
You can typically confirm that you need to embed database credentials in Tableau server by running a simple test from your web browser.
Manually attempt to pull the data (CSV) or image (PNG) pull via your web browser. Just add ?format=csv or ?format=png to the end of the url in your web browser address and hit return. If nothing is returned, then with your Web Browser network traffic setting turned on, you should see an HTTP 406 or 500 error returned.
4. 500 Errors for Image Size
If you can download a CSV but not a PNG file then make sure Tableau can export the Image file from the Viz. You might see an error "Image could not be rendered because it is too large." If Tableau cannot create the file, Metric Insights cannot collect it.