Resolve Data Function Errors When Upgrading Spotfire

Despite all of the current chaos, we are getting ready to upgrade our Spotfire installation. I’m a bit sad we are only going from 10.2 to 10.3, but 10.3 is the last LTS version. In performing testing in our dev environment, we ran into errors with data functions using packages. This post will explain how to resolve the error — ‘xyx package’ was built by an R engine with different internals. Read on to learn how to resolve data function errors when upgrading Spotfire.

Changes to Spotfire 10.3+ Trust Settings

Before I dive into how to fix this error, I must make sure you know TIBCO changed data trust settings after version 10.2. They explain those changes in this community post.

In short, Spotfire 10.3 adds the trust mechanism to data functions, as well as improving it by introducing SHA-512 for calculating the trust stamp. This means that there are additional steps required during the upgrade to Spotfire 10.3, to make sure data functions continue to work as before.

The statement above is meant for administrators. As a user, just know that trust settings have changed, and the error we are discussing in this post is not related to trust settings.

Cause of the Error

You can read the TIBCO support article detailing the changes below. The short version is that the error is caused by version changes.

To help clarify, I have shown my Spotfire version and the corresponding TERR and R versions deployed within. For information on how to find this information for your installation, check out this post I wrote on Data Shop Talk and this Community post on the TERR version deployed in different Spotfire version.

Spotfire 10.2 uses TERR 4.5 and R 3.4.4.

Spotfire 10.3.5 uses TERR 5.0 and R 3.5.2.

The article says the error is the expected behavior in TERR 5.0.0 (my dev version) if the installed version of that CRAN package was built using open-source R earlier than R 3.5.0. Spotfire 10.2 was running R 3.4.4 which is earlier than R 3.5.0. So, this error is to be expected. How do we fix it? It’s pretty simple.

How to Fix the Error

The Resolution section of the article says this…which doesn’t sound helpful. BUT…

Package versions that were built using R 3.5.0 or later cannot be used with TERR 4.5.0 or earlier.

Package versions that were built using an R version earlier than R 3.5.0 cannot be used with TERR 5.0.0 or later.

Generally speaking, developers build packages in a specific version of R. A newer version of R may contain changes that make it incompatible with the package. Then, you get errors. The same can be true for package updates. It’s possible an updated package isn’t compatible with an older version of R.

Now, as it relates to Spotfire and TERR, there may be an updated version of the package you are using for the version of TERR and R deployed in Spotfire. Therefore, the solution to this problem is to simply install the new version. Here are the steps to do that.

  1. Open up TERR Tools from the Tools menu.
  2. Go to the Package Management tab.
  3. Select a CRAN Package Repository and click Load.
  4. Find your package in the Installed Packages list.
  5. Select the package and click Remove.
  6. Search for the package in the Available Packages list.
  7. Select the package and click Install. You should see the version number of the package update.
  8. Rerun the data function to see if the error resolves.

The screenshots below show the difference in package versions for dplyr between Spotfire 10.2 and 10.3.

Spotfire 10.2 was running dplyr 0.7.7.
Spotfire 10.3 has version 0.7.8 for installation.

This should help you resolve data function errors when upgrading to Spotfire 10.3 and higher.

Spotfire Version

Content created with Spotfire 10.2 and 10.3.

Other TERR Posts

1 thought on “Resolve Data Function Errors When Upgrading Spotfire”

  1. Pingback: 7 Spotfire Library Best Practices » The Analytics Corner

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.