HOW-TO

  • Getting Started
    • AIMMS Basics
      • Getting Started Tutorials
        • Tutorial for Beginners
      • Keyboard shortcuts for AIMMS
      • Share an AIMMS Project
      • Install AIMMS in another location
      • Overview: Create a reliable and successful AIMMS application
      • Add AIMMS Libraries
      • Encrypt Projects to Protect Intellectual Property
      • Overview: Model Sources, Version Control and aimmspack Files
    • Program Settings
      • Export Code to Another Project
      • Display Line Numbers in the Editor
      • Change Syntax Highlighting and Display Options
      • Set Encoding Format
      • Adjust Engine and Solver Settings
    • Licensing
      • Install single user developer license
      • Transfer a Developer License to Another Machine
      • Resolve License Error: Nodelock file is read-only
      • Resolve License Issues
      • How to link a solver to AIMMS
      • Activate Machine Nodelock Offline
      • Licensing using Network License Server
        • Configure a Network License
        • Register Named Users in Network License Manager
        • Install the Network License on a client computer
        • Migrate the AIMMS PRO License Server
  • AIMMS Developer
    • Data Connection
      • Databases
        • Which ODBC Drivers
        • Link an SQLite Database to a Project
        • Install Side-by-Side Drivers
        • Connection string for Access database files
        • Write Selected Database Tables
        • Write to a Database Efficiently
        • Write data to a table
        • Adapt model when linked database table is modified
        • Exchange data with the AIMMS Cloud Platform
        • Reading relations and indexed sets from databases
        • DirectSQL Example
        • Create a static AIMMS Library from a runtime library
      • Excel and CSV
        • AIMMS Excel Library - AXLL
        • Read Columns of Data from Excel
        • Read and Write CSV Files
        • Determine Data Ranges in Excel Files
      • HTTP Library
        • Overview: HTTP Client Library
        • Extract Data from an XML File
        • Extract XML File from a Server with the HTTP Library
        • Retrieve Geographic Data with Google Maps API
        • Retrieve Geographic coordinates with Google Maps API
        • Extract Photos Using the Flickr API
        • Convert Audio File with IBM API
        • Use the IBM Image Recognition API
        • Integrate AIMMS with Models Built in Languages like Python or R
        • Integrate AIMMS with Python
        • Integrate AIMMS with R
      • Data Exchange Library
        • How to integrate the Data Exchange Library
        • How to use the Data Exchange Library for extracting files and data
        • How to create mappings for matrix-oriented data via name-binds-to
        • Reading slices of data via ExternalBinding mapping element
        • Dealing with different data types in the DEX
        • OpenAPI
      • Other Functions
        • Create Email Templates
        • Overview: Email Client Library
        • Create an External Function with Visual Studio
        • Exchange Data with External Source
        • Run Executable Files
        • Run Batch Commands with AIMMS Command Line Tool
        • Link AIMMS with Tableau
        • Connect AIMMS with Gurobi
        • Overview: Linking to AIMMS
    • Mathematical Modeling
      • Adapt Solve Procedure with Callbacks for GMP
      • Color a Map with Constraint Programming
      • Use Constraint Programming to Solve ROGO Puzzle
      • Optimize Shift Schedules
      • Reduce the Time Window for Scheduling Jobs
      • Optimize Scheduling for Project Planning
      • Use a Multi-Objective Approach
      • Minimize Objective Containing a min Operator
      • Model Variables with Limited Values
      • Various (integer) linear modeling tricks
      • Model a Rounded Variable
      • Debug an Infeasible Model
      • Speed Up MIP Solve
      • Providing an Initial Solution to MIP Solvers
      • Data for Optimization Libaries
      • Nonlinear Presolve Algorithm in AIMMS
      • AIMMS Outer Approximation Algorithm for MINLP (using GMP functionality)
      • Solving convex MINLP problems with AIMMS
      • Vehicle Routing
        • Capacitated Vehicle Routing Problem Library
        • Capacitated Vehicle Routing Problem formulation
        • Explicit Dantzig-Fulkerson-Johnson formulation
        • Implicit Dantzig-Fulkerson-Johnson formulation
        • Miller-Tucker-Zemlin formulation
        • Time Windows
        • Testing the Library
    • AIMMS Language
      • AIMMS Language Basics
        • Overview: Set, Subset, Index and Element Parameter
        • Identifier Naming Convention
        • Application initialization and termination with libraries
        • Standardize Random Data in Distribution Functions
        • Using LoopCount instead of explicit counting parameter in loops
        • Solve in a Loop
        • Local Binding vs. Default Binding
        • Model category mapping of items
        • Monitor Identifiers for Changes
        • Convert string to numerical value
        • Write and Read AIMMS Data in Text Format
        • Interrupt Execution During a Single Statement
        • Generate random numbers
        • Get Name of an AIMMS Case
        • Check Computations with Units of Measurement
        • Localize Units of Measurement per User
        • Save a Case from an AIMMS Procedure
        • Identify differences
        • Finding unused identifiers
      • AIMMS sets
        • Composite objects
        • Representing time
        • Element after Last
        • Handling of Integer Sets and Operators
        • Select Constraints and Variables for a Math Program Declaration
        • Multiple indices for a set
        • Overview: types of Set
        • Overview: NBest Operator
        • Remove elements from a set
      • Execution Efficiency
        • Analyze Long Execution Time
        • Measure Execution Time
        • Optimize Execution Time
        • Reduce Memory Usage
        • Investigate Memory in Use
        • Monitor Memory Usage and Leaks
      • Libraries
        • Library of functions and procedures
        • Test Driven Development using the AIMMSUnitTest Library
        • Retrieve Value of Dynamic Identifier
        • Repeat Data with Model Query and Model Edit
        • Use Formulas as Data
        • Runtime functions with arguments
        • Create a static AIMMS Library from a runtime library
      • Solvers
        • Change the Frequency of Progress Updates
        • Retrieve Solver Log Files in AIMMS Developer
        • Retrieve Solver Log Files in AIMMS PRO
        • Overview: Generated Mathematical Programs
        • Set Stop Criteria for Math Programs
        • Generate Multiple Solutions with CP Optimizer
        • Use Alternative MIP Solutions with CPLEX Solution Pool
        • Automatic Benders’ decomposition
        • Solve with Benders Decomposition in CPLEX
        • Solve with Lazy Constraints
        • Debug Infeasible or Unbounded Results
        • Change the Default Solvers Used
        • Create Local Solver Configuration
        • Solve MINLP problems with AOA
        • Check if variable values satisfy constraints
        • Use a Multi-Objective Approach
        • Tune CPLEX Options from AIMMS
        • Solve in parallel with Asynchronous Solver Sessions
        • Adding a Solver
    • Error Handling
      • Get Log Files
      • Get More Log Information
      • Handle errors and warnings
      • Customize Settings for Errors and Warnings
      • Identify error
      • Configuring the logging of sessions ran on a AIMMS PRO on Premise
      • Download Server Session Log
      • Tracing procedures
      • In model tracing
      • Sending a dump file?
      • What is a dump file?
      • Trouble shooting
        • Openstreetmap images missing from network object
        • Academic and community licenses: No logon response from server
        • Storing project in One-Drive: A file cannot be created when it already exists
        • Empty WebUI after upgrade
        • Sudden Microsoft Access reporting: “make sure this is a valid datasource”
        • Error message “tlsv1 alert protocol version”
        • Writing to a Snowflake database
  • Application UI
    • UI Features
      • Showing progress of long running algorithms
      • Working with Wonderful WebUI Widgets
      • Create Wonderful WebUI Widgets
      • The iFrame widget
      • Create Forms in WebUI
      • Zoom and Scroll in a Gantt Chart
      • Sailing across the world
      • Add Compressed Files for User Download
      • Selecting Pages for Workflow Panels
      • Combine Bar Chart and Line Chart
      • Comparing schedules from scenarios
      • Add qualitative color palettes
      • Consistent data coloring on an AIMMS WebUI page
      • Refreshing an Image widget without changing the file name
      • Hiding Default Values
      • Using Scalar Border Annotation
      • Disable Standard WebUI Functions
    • Styling
      • Change Widget Styles with CSS
      • Adding a logo to an AIMMS WebUI app
      • Change Hover and Select Effects for WebUI Charts
      • Display an On/Off Switch in Widgets
      • Adding an Icon on your Button
      • Adding an Icon on your Menu Bar
      • Dos and Don’ts
      • Best Practices in your Application
  • Deployment
    • PRO Basics
      • Size AIMMS PRO Server Hardware
      • Publishing to offline servers
      • Create PRO User Groups
      • Understanding Concurrent Usage on AIMMS PRO/Cloud
      • Overview: Best Practices for Operating AIMMS PRO
      • Send and Receive Messages
      • Schedule Regular Jobs
      • Upload and Download Files on AIMMS PRO
      • Secure File Access
      • Copy Folder Operations in PRO Storage
      • Change AIMMS PRO account
      • Number of running and pending solver sessions
      • Migrate PRO Server to Another Machine
      • Troubleshoot Unresponsive Applications
      • Scaling AIMMS PRO
      • Protect AIMMS PRO installation for business continuity
      • Waiting for sub jobs to complete
      • Investigate Behavior of AIMMS PRO Job
    • Cloud Platform Basics
      • Exchange data with the AIMMS Cloud Platform
    • Client-Server Communication
      • Create responding applications
      • Deploy an Application on AIMMS PRO
      • Develop Multi-Platform Applications
      • Keep WebUI Active During Solve
      • Load solver session Results Manually
      • Use the Progress Window in WebUI
      • Show Intermediate Solutions
      • Interrupt the solver session
      • Modifying Session Timeout Duration for WebUI Apps
      • Communicate Data Changes in WebUI
      • Exporting aimmspack for WinUI or WebUI
      • Reduce Exchange Between Client Session and solver session
    • AIMMS PRO API
      • Start a Job via PRO API using Java
      • Start a Job via PRO API using C#
    • Collaborative Data Management (CDM)
      • Install CDM Service
      • Log CDM
  • Software Evolution
    • Evolution of AIMMS using Transport Layer Security
    • Convert a GAMS Model or AIMMS 3 model to an AIMMS 4 Model
    • Overview: Deprecation of Compound Sets
    • Prepare for the Deprecation of Compound Sets
    • Convert Files from DAT to DATA
    • Using UNICODE in maintained AIMMS applications
    • Upgrade WebUI Page Actions
    • Upgrade Old WebUI Maps
    • Upgrade an AIMMS PRO Installation
    • Check Version Dependencies for AIMMS Developer and AIMMS PRO
    • Update WebUI to newer AIMMS version
    • Unsupported browser
    • WinUI
      • Align Objects in WinUI
      • Change Views of 2D Charts in a WinUI Page
      • Enable the Page Manager
      • Add a Custom Startup Image in WinUI
      • More logging of WinUI Published Applications
  • Examples
    • Examples vs WebUI Widgets
    • Application Examples
      • Car Selection
      • Circle Packing
      • Contract Allocation
      • Data Reconciliation
      • Distribution Center Allocation
      • Economic Exchange Equilibrium
      • Employee Scheduling
      • Flow Shop
      • Gate Assignment problem
      • Knapsack Problem
      • Life Cycle Consumption
      • Project Analysis
      • Railway Stock
      • Reindeer Pairing
      • Sudoku
      • Traffic Equilibrium
      • Transport Model
      • Traveling Salesman
    • Functional Examples
      • 3D Chart
      • AIMMS API
      • Arcs and Nodes
      • Calendar
      • Camping
      • Chance Constraints
      • Coloring
      • Create CSV File
      • Database Inspection
      • Database Interface Generation
      • Data Feed
      • Date Aggregation
      • Demand Forecasting
      • Distributed Solver Sessions
      • Distributions
      • Email and Sound Support
      • Error Handling
      • Experiment
      • External Procedure
      • Gantt Chart
      • GIS Support
      • Goal Programming
      • Horizon
      • Indexed Page
      • ipTwist
      • Interrupt AIMMS Externally
      • Linked Objects
      • Model Edit API
      • Model Edit Functions
      • MPS Functions
      • Multi Start
      • Nested Solve
      • Oil Well Drilling
      • Page Resizability
      • Pivot Table
      • Power System Expansion RO
      • Print Pages
      • Rolling Horizon
      • Stochastic Programming
      • Tea Consumption
    • Modeling Book Examples
      • Bandwidth Allocation
      • Cutting Stock
      • Diet Problem
      • Employee Training
      • Facility Location Choice
      • Farm Planning
      • File Merge
      • Inventory Control
      • Investment Portfolio Selection
      • Media Selection
      • Performance Assessment
      • Power System Expansion
      • Refinery Pooling Planning
      • Telecommunication Network Design
      • Two Level Decision
    • Practical Examples
      • Chemical Engineering: Blending problem
      • Chemical Engineering: Chemical Equilibrium problem
      • Energy: Oil pipeline design
      • Energy: Water Distribution Network Design
      • Power Systems Planning - Methods and Applications
      • Engineering: 2D Strip Packing
      • Engineering: Goddard rocket
      • Engineering: Hanging chain
      • Engineering: Largest small polygon
      • Engineering: Robot arm
      • Engineering: Structural Optimization
      • Location: Capacitated warehouse location
      • Location: Capacitated facility location problem (CFLP)
      • Lot Sizing: Multi level bucket
      • Lot Sizing: Single level big bucket
      • Lot Sizing: Single level small bucket
      • Lot Sizing: Single level small bucket with two items
      • Miscellaneous: Asynchronous solver sessions
      • Miscellaneous: Multistart
      • Multiple Solutions: Dice problem
      • Production Planning: Machine scheduling
      • Routing: Capacitated Vehicle Routing Problem
      • Routing: Capacitated Vehicle Routing Problem with Time Windows
      • Telecommunications: Delay constrained routing
      • Telecommunications: Filter design
      • Telecommunications: Capacitated network design problem
      • Transportation: Aircraft Assignment
      • Transportation: Aircraft landing
      • Transportation: Piecewise linear transportation
      • Uncertainty: Synchronous Optical Network Ring Design
      • Uncertainty: Production Planning - Robust Optimization
      • Uncertainty: Production Planning - Stochastic Programming
  • Toolkit
    • Comparing Profiler Runs
    • Stopwatch Library
  • Recently added
AIMMS How-To
AIMMS Logo
  • Community
    • Welcome
    • Product Q&A
    • Common Interests
    • Product Updates & Roadmap
  • Documentation
    • User Guide
    • Language Reference
    • Modeling Guide
    • Function Reference
    • WebUI
    • PRO Platform
    • Cloud Platform
    • Library Repository
  • How To
    • Getting Started
    • AIMMS Developer
    • Application UI
    • Deployment
    • Software Evolution
    • Examples
    • Recently Added
  • Downloads
  • Release Notes
    • AIMMS Development RELEASE NOTES
    • AIMMS Deployment RELEASE NOTES
    • AIMMS SC App Store RELEASE NOTES
  • How-To »
  • AIMMS Developer »
  • Data Connection »
  • Other Functions »
  • Link AIMMS with Tableau
  • Edit on Github
Help & feedback

Table Of Contents
  • Link AIMMS with Tableau
    • Existing capabilities to export data to Tableau
    • Flexible Tableau exports
    • The DataLink library
    • Working with the DataLink library
    • Support for other BI tools

Link AIMMS with Tableau

Warning

As of AIMMS 4.74 the Tableau Datalink Provider is deprecated.

Customers using the Tableau Datalink Provider can convert the data to a regular data txt representation (instead of creating TDE-files) and enable any update needs within the Tableau product itself.

Although both the traditional AIMMS Windows UI and the new AIMMS WebUI offer excellent data visualization capabilities to view the data present within an AIMMS application, many of our customers have expressed the wish to be able to view and work with AIMMS data in Tableau (and other BI tools such as QlikView, or Spotfire). This allows a much wider audience within a company to track KPIs on dashboards based on the results from an AIMMS application, using a wider range of graphical capabilities to drill down into the data presented, and to cross analyze these results against data from various other corporate data sources.

../../_images/AIMMS.Data_.For_.Tableau.TDE_.png

Fig. 40 Data in Various AIMMS WebUI Views

Existing capabilities to export data to Tableau

As Tableau supports a great deal of data sources to retrieve their data from, and AIMMS offers data integration with data sources such as databases, Excel and CSV files, it is not hard to think of a multitude of ways to accomplish integration of AIMMS data within Tableau. However, all of these integration scenarios share the common characteristics that they are indirect, and can quickly become cumbersome. This can either be caused by the multitude of (automated or manual) steps necessary to get AIMMS data available in Tableau, or because IT needs to get involved to set up the intermediate databases and their associated access rights from which the BI tool can read the AIMMS results. An intermediate database to provide the linkage between AIMMS and Tableau may actually work very well for AIMMS applications that are well established and provide data in a more or less fixed format. In such a scenario, making AIMMS data available in Tableau  may become a completely automated process.

Flexible Tableau exports

However, flexibility is also a key concept for both AIMMS and Tableau . The major strength of modeling tools such as AIMMS is that one can model anything, and that existing models can be easily adapted to changing business constraints and conditions, and the ensuing model changes may provide completely new data. Tableau excels in cross analyzing any available data from various data sources. In such a rapidly changing reality, relying on intermediate databases managed by the corporate IT department to provide flexible linkage between AIMMS and Tableau sounds more like a contradiction in terms.

../../_images/Tableau.Desktop.with_.AIMMS_.Data_.png

Fig. 41 The AIMMS-generated TDE File in Tableau Desktop

The DataLink library

Thus, with ease-of-use and flexibility in mind, we have created an AIMMS DataLink library that provides fully automated, flexible linkage with Tableau, which you can include into your model whenever you feel the need to export the results from your model to Tableau. In fact, you can create native Tableau TDE-files right from AIMMS and either save them as is, or publish them - from within AIMMS – directly on your Tableau Server so the data becomes available for the organization through e.g. Tableau Server’s worksheets and data views.

../../_images/Tableau.Server.with_.AIMMS_.Data_.png

Fig. 42 The AIMMS-generated & published TDE File to Tableau Server

You can also imagine looking at the same data from within AIMMS while doing some further exploration in Tableau so you can combine the best of both world.

Working with the DataLink library

The DataLink library is available from the library repository. This repository can be accessed via AIMMS > File > LibraryManager, and you can also find the documentation with an example that demonstrates the use of the DataLink library. To see how the Tableau link works, let’s take a look at the example project. I’ll explain how to specify which identifiers in the model need to be written to a TDE file, how to actually generate a native Tableau TDE file, and how to upload a TDE file to a Tableau Server right from your model.

Annotations

To indicate which identifiers in a model need to be exported to a TDE file, the DataLink library uses a feature in AIMMS called annotations. Annotations in AIMMS are generic string-valued key-value pairs, that can be associated with any node in the model tree in the AIMMS IDE, and can be set through the regular attribute form of a model node. If set on a section within the model, the annotation value will be inherited by all child nodes underneath that section. Any model library can define its own collection of annotation keys; they serve as library-specific properties that you can set for every identifier in a model. Thus, annotations allow any developer to extend the core functionality of AIMMS by creating generic libraries, with full support for specifying the properties necessary to use such a library within the model tree.

Use for Tableau link

The DataLink library is an example of such a generic library: by adding it to a model, you extend the functionality of AIMMS with the capability to create and export TDE files generated from data in the model. Thus far, we have defined two annotation types for the DataLink library,

  • dl::Table

  • dl::Category

../../_images/annotations.png

Fig. 43 DataLink annotations set on a declaration section

By specifying the dl::Table annotation for a specific identifier in a model, you indicate that you want to store the content of that identifier in the table with the name specified through the annotation, along with all other identifiers that hold the same dl::Table value.  All identifiers exported to the same TDE table should have the identical index domain. If a section in your model contains a set of identifiers with the same domain that all need to be exported to the same TDE file, you can simply set the dl::Table annotation on the section, after which the value will be inherited by all identifiers in that section. Identifiers for which the dl::Table annotation is not set will not be exported to a TDE file. Through the dl::Category annotation, you can specify one or more categories of identifiers that you want to selectively export to a TDE file.

../../_images/tableau-control.png

Fig. 44 Main window to Tableau example project

Creating a TDE file

After you have selected which identifiers to export to which TDE files, you can actually create a TDE file by calling the procedure dl::TDEDataWrite contained in the DataLink library. It will export all identifiers for which the dl::Table annotation has been specified to their corresponding TDE files. Through the optional category argument you can limit the export to those identifiers for which the dl::Category annotation matches the category argument. Once the TDE file has been created you can open it using the Tableau desktop application. Alternatively, you can display it within the AIMMS end-user UI by opening it through the Document Viewer object.

Uploading a TDE file to a Tableau Server

Once the TDE file has been created, you can subsequently upload to a Tableau Server through the procedure dl::UploadTDEToServer. Through the arguments of this procedure you must provide the server info and credentials necessary to upload the file. After you have uploaded a TDE file to the Tableau Server you can view the data by logging onto the the Tableau Server via your browser and opening a workspace that is linked to the data in the uploaded file.

Embedding Tableau in the AIMMS Web UI

../../_images/AIMMS.WebUI_.TableauWidget.png

Fig. 45 Example of an AIMMS WebUI with a Graph widget and a custom Embedded Tableau View widget

If you are using the AIMMS Web UI, you can also display the contents of a Tableau Server workspace in a frame widget within a page in your Web UI. Note the library procedures to create and upload TDE files can also be executed from within a server-side data or optimization session. In this way you can easily integrate the AIMMS Apps published on AIMMS PRO and Tableau browser interfaces, offering a unified experience and user interface to your end-users.

Support for other BI tools

In this blog post and library we have focused on connectivity between AIMMS and Tableau, so what about other BI tools such as QlikView or Spotfire? Well, the source of the DLL behind the DataLink library that performs the actual export to Tableau TDE files has been set up in such a manner, that the logic for collecting the data from AIMMS has been kept generic and completely independent from the underlying data source to which the data is to be exported. Thus, extending the DataLink library to support multiple BI tools is not a major task.

In fact, the interface to export to any data source is fairly straightforward, and consists of a mere five functions to be implemented:

  • Creating a new (or opening an existing) data source

  • Creating a new (or opening an existing) table within an open data source, based on structure information provided by the data collection layer

  • Write records created by the data collection layer to an open table

  • Closing an open table

  • Closing an open data source

If you are interested in extending, or having the DataLink library extended to QlikView or Spotfire, please drop us a line.

Last updated: Oct 05, 2020

Help & Feedback

Docs

Edit this page to fix an error or add an improvement in a pull request
Create an issue to suggest an improvement to this page

Product

Create a topic if there's something you don't like about this feature
Propose functionality by submitting a feature request

Support

Not what you where looking for? Search the docs

Remember we also have Community support

Still having trouble ? Reach out to us



Was this helpful?

Next Previous

AIMMS
AIMMS COMMUNITY
AIMMS DOCS
DISCLAIMER
PRIVACY STATEMENT
© 1989 - 2023 AIMMS B.V.