← Back to Function Catalog

Complete DataAI Function Coverage for Tableau

The dataai-spark-tableau Maven artifact depends on dataai-spark-functions, so adding the Tableau artifact makes the complete DataAI computational catalog available transitively. Algorithms are not copied into Tableau code; they remain tested once in the portable functions module.

Every DataAI function result is already a Spark Dataset<Row> or a small record containing DataFrames. Pass any result DataFrame to TableauFunctionOutputs.withRunMetadata(...), persist it under a governed table/view, and connect Tableau through Spark SQL or Databricks.

Coverage

Function familyDataAI APIs available to Tableau pipelinesSuggested result name
ETL pipelineDataAiPipeline, declarative RuleSpec validationpipeline_*
Data qualityDataQualityFunctions automatic, missing, duplicate, date, outlier, category, and text checksquality_*
General analyticsAnalyticsFunctions summaries, pivot, variance, ranking, correlations, regressionanalytics_*
Time analysisTimeSeriesFunctions summaries, moving averages, rolling totals, period changestime_*
Business analyticsBusinessFunctions outliers, anomalies, drift, Pareto, cohort, funnel, KPIbusiness_*
Market modelsMarketFunctions demand, pricing, elasticity, basket, segments, churn, risk, inventory, profit, scenariomarket_*
GeographicMapFunctions.readiness(...) and all returned readiness DataFramesmap_*
MatrixMatrixFunctions.crossTab(...) and MatrixFunctions.balance(...)matrix_cross_tab, matrix_balance
InsightsInsightFunctions dictionary, chart recommendations, narratives, and alertsinsight_*

Universal adapter

Dataset<Row> tableauResult = TableauFunctionOutputs.withRunMetadata(
        dataAiFunctionResult,
        "market_demand",
        runId,
        completedAt,
        libraryVersion);

tableauResult.write()
        .format("delta")
        .mode(SaveMode.Overwrite)
        .saveAsTable("analytics.dataai_market_demand");

The added reserved columns are:

The adapter rejects a result that already contains one of these names instead of silently overwriting customer data.

Matrix balancing

Matrix balancing is explicitly supported. Use TableauFunctionOutputs.matrixBalance(...) to expose balancedCells() plus:

The output retains the DataAI matrix fields: original value, balanced value, row and column targets, balanced totals, differences, and coefficients. The complete persistence example is ../examples/java/TableauMatrixBalancingExample.java.

Tableau can visualize the balanced values as a heat map, highlight target differences, filter to non-converged runs, and compare original versus balanced values. The customer's Spark job remains responsible for convergence policy and must decide whether a non-converged result may be published.