The connection string created in PetroAI Cloud can be used in Spotfire to connect to your PetroAI database. This guide shows the few steps needed to make this connection so you can start browsing data in Spotfire. 


How-to Connect TIBCO Spotfire to PetroAI Cloud


The connection can be setup in just a few steps:

  • Step 1: Create MySQL connection
  • Step 2: Setup views in connection
  • Step 3: Import the data


Step 1: Create a MySQL connection

  • Click the "+" sign or go to File -> Open
  • Selected Connect to and then choose the MySQL option
  • Click New connection




  • Paste the connection string from PetroAI cloud into the Server field
  • Fill in the Username and Password fields with the credentials create in PetroAI Cloud
  • Click Connect 
  • You should see the Database field at the bottom of the window update with the name of your PetroAI database
  • Click OK


Be sure to only use the URL portion of the connection string which should start with "pai". Also make sure the username includes the database prefix. 



Step 2: Setup views in the connection

  • Once the MySQL connection is created a new dialog will appear where you can setup the views and tables to import
  • Click on Custom Query -> New Custom Query...



  • A custom query will be created for each table in the connection
  • Enter a name for the first query
  • Use the following in the body of the query: SELECT * FROM example1.Well


In the above snippet, "example1" should be replaced with your database name in all queries. "Well" should be replaced with each table being imported. 



  • Click Verify and then OK

 


  • Repeat the above steps to add custom queries for each table
  • Once all tables are setup, click OK in the Views in Connection window

Step 3: Import the data

  • At this point, you have the option to import the data, load the data on demand, or keep the data in the external database
  • Importing the data is required for some Spotfire functionality, however, large data sets, like proudction can be loaded on-demand
  • Select your preference for each table and then click OK at the bottom of the side panel



  • You can now create tables and visualizations with your PetroAI data!