TruMan1
TruMan1

Reputation: 36078

Call C# method from Tableau

I would like to use Tableau to generate reports. However, there are tons of business logic in C# that compute some properties dynamically to produce he data set I want to feed into Tableau reporting, so some columns do not exist in the SQL tables.

Is there a way for Tableau to call C# code to generate dynamic columns to run reports on?

Upvotes: 1

Views: 1579

Answers (1)

Alex Blakemore
Alex Blakemore

Reputation: 11896

One option is to have your C# program generate tables in a form that Tableau can ingest, either csv, database tables or a Tableau extract. The Tableau SDK has routines you can call from C# to generate a Tableau Data Extract (.tde) file.

You can then execute these procedures on a schedule or on demand. If you generate a TDE file, you can use the REST api to push it to Tableau Server so multiple Tableau workbooks can reference it.

This approach works well when you have bulk data that might exceed what a web service data connector could efficiently handle, and when your data update frequency is modest (say, when nightly or perhaps hourly updates are sufficient). It also offloads reporting query load from your system. It isn't necessarily the best approach when your data changes frequently, and your reporting requirements must see up to the minute changes.

If you go this route, design your extracts for the visualizations they support. For best performance, only include the data and level of detail needed for the visualizations -- e.g., rollup dates.

Also, a handful of targeted extracts often performs better than one giant extract that tries to copy every detail of your database.

Upvotes: 2

Related Questions