HOW-TO

  • Getting Started with AIMMS
  • Getting Started
    • Set Encoding Format
    • Adjust Engine and Solver Settings
    • How to Link a Solver to AIMMS
    • 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
  • Licensing
    • Activating Licenses Offline
    • Single-User License
      • Install Single-User License
      • Transfer Single-User License to Other Machine
      • Single-User License Troubleshooting
    • Network License
      • Install and Configure a Network License
      • Install the Network License on a Client Computer
      • Named Users in License Manager
      • Migrate AIMMS PRO License Server
    • Academic and Community License
      • Academic and Community License Troubleshooting
  • AIMMS IDE
    • Installing AIMMS
    • Configuring AIMMS IDE
    • Keyboard Shortcuts
    • Sharing AIMMS Project Files
    • Export Code to Another Project
  • AIMMS Developer
    • Data Connection
      • Data Exchange Library (DEX)
        • 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
        • Using OAuth2 for API authorization with DEX
        • Use the AIMMS Cloud Azure Data Lake Storage for integrating data
        • How to access the Azure Data Lake Storage from an external location
        • Creating and Connecting Python Service to AIMMS
        • OpenAPI
        • Develop an AIMMS Service
        • A Framework for Progress, Logging, and Error Handling of Tasks
      • Databases
        • Connecting to and using the AIMMS Cloud database
        • Which ODBC Drivers
        • Link an SQLite Database to a Project
        • 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
        • How to Use Direct SQL Queries
        • Create a static AIMMS Library from a runtime library
      • AIMMSXL Library (AXLL)
        • AIMMS Excel Library - AXLL
        • Read Columns of Data from Excel
        • 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
      • Other Functions
        • Create Email Templates
        • Overview: Email Client Library
        • Create an External Function with Visual Studio
        • Exchange Data with External Source
        • Link AIMMS with Tableau
        • Connect AIMMS with Gurobi
        • Linking to AIMMS
        • Read and Write CSV Files
    • 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
        • 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
      • Tracing Procedures
      • In model tracing
      • Sending a dump file?
      • What is a dump file?
      • Troubleshooting
        • Academic and community licenses: No logon response from server
        • Sudden Microsoft Access reporting: “make sure this is a valid datasource”
        • Writing to a Snowflake Database
  • WebUI
    • Core
      • Best Practices in your Application
      • Dos and Don’ts
      • Showing Progress of Long Running Algorithms
      • Selecting Pages for Workflow Panels
      • Comparing Schedules from Scenarios
      • Disable Standard WebUI Functions
      • Uponchange with Arguments
    • Styling
      • Working with Wonderful WebUI Widgets
      • Create Wonderful WebUI Widgets
      • Add Qualitative Color Palettes
      • Consistent Data Coloring on an AIMMS WebUI Page
      • Hiding Default Values
      • Using Scalar Border Annotation
      • Using Table Background Annotation
      • Hiding Widget Header
      • Centering Cells in Table Widget
      • 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 Menu Bar
    • Widgets
      • The iFrame Widget
      • Zoom and Scroll in a Gantt Chart
      • Sailing Across the World
      • Refreshing an Image Widget Without Changing the File Name
      • Adding an Icon on your Button
  • Deployment
    • PRO Basics
      • Understanding Concurrent Usage on AIMMS PRO/Cloud
      • Send and Receive Messages
      • Schedule Regular Jobs
      • Upload and Download Files on AIMMS PRO
      • Secure File Access
      • Copy Folder Operations in PRO Storage
      • Number of running and pending solver sessions
      • 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
      • Exchange data with the AIMMS Cloud Platform
      • Using CI/CD with AIMMS
      • Publishing, Running and Deleting apps on the Cloud
    • 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#
    • Miscellaneous
      • Run Batch Commands with AIMMS Command Line Tool
      • Run Executable Files
      • Zipping and Unzipping on AIMMS Developer and on AIMMS Cloud
  • AIMMS PRO & Cloud Platform
    • User Management
      • Create PRO User Groups
    • AIMMS PRO OnPremise
      • Migrate PRO Server to Another Machine
      • Download Server Session Log
      • Size AIMMS PRO Server Hardware
      • Install CDM Service
      • Log CDM
      • Publishing to Offline Servers
      • Change AIMMS PRO Service Account
      • Best Practices for Operating AIMMS PRO
  • Software Evolution
    • Update the Project’s AIMMS Version
    • Overview: Deprecation of Compound Sets
    • Prepare for the Deprecation of Compound Sets
    • Install Side-by-Side Drivers
    • Upgrade WebUI Page Actions
    • Upgrade Old WebUI Maps
    • Convert a GAMS Model or AIMMS 3 Model to an AIMMS 4 Model
    • Convert Files from DAT to DATA
    • Upgrade an AIMMS PRO Installation
    • Check Version Dependencies for AIMMS Developer and AIMMS PRO
    • Using UNICODE in Maintained AIMMS Applications
    • Update WebUI to Newer AIMMS Version
    • Error Message “tlsv1 alert protocol version”
    • Evolution of AIMMS using Transport Layer Security
    • Unsupported Browser
    • Dollar or Pipe Sign?
    • Empty WebUI After Upgrade
    • 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
      • Openstreetmap Images Missing from Network Object
  • Examples
    • Examples vs Features
    • Demo Applications
      • Contract Allocation
      • Employee Scheduling
      • Knapsack Problem
      • Reindeer Pairing
      • Traveling Salesman
      • Vessel Scheduling
      • EV Charging Location
    • Functional Applications
      • Geolocation AbstractAPI
      • Demand Forecasting
      • Bias in AI
    • WinUI Applications
      • 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
      • 3D Chart
      • AIMMS API
      • Arcs and Nodes
      • Calendar
      • Camping
      • Chance Constraints
      • Database Inspection
      • Database Interface Generation
      • Data Feed
      • Date Aggregation
      • Distributed Solver Sessions
      • Distributions
      • Email and Sound Support
      • Error Handling
      • Experiment
      • External Procedure
      • Gantt Chart
      • GIS Support
      • Goal Programming
      • Horizon
      • Indexed Page
      • Interrupt AIMMS Externally
      • Linked Objects
      • Model Edit API
      • Model Edit Functions
      • MPS Functions
      • Multi Start
      • Nested Solve
      • Oil Well Drilling
      • Power System Expansion RO
      • Print Pages
      • Rolling Horizon
      • Stochastic Programming
      • Tea Consumption
      • 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
      • Car Selection
      • Circle Packing
      • Data Reconciliation
      • Distribution Center Allocation
      • Economic Exchange Equilibrium
      • Flow Shop
      • Gate Assignment problem
      • Life Cycle Consumption
      • Project Analysis
      • Railway Stock
      • Sudoku
      • Traffic Equilibrium
      • Transport Model
  • Toolkit
    • Comparing Profiler Runs
    • Stopwatch Library
    • DataLake Tools
  • Recently added
AIMMS How-To
AIMMS Logo
  • 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. 19 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. 20 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. 21 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. 22 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. 23 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. 24 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


Next Previous

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