# PetroPanel

# Getting Started

The PetroPanel is a Petro.ai extension that allows users to access application data. The following steps describe how to load data into Spotfire using the PetroPanel Actions.

  1. In Spotfire, go to View > PetroPanel.
  2. In the PetroPanel, click on Database to set your PetroDatabase connection. Ensure the connection is successful before proceeding.
  3. In the PetroPanel, click the Action > Add Actions to create an action.
  4. A list of predefined actions will appear. Select the Action of interest and scroll below to configure the selected action.
  5. After configuration, select Execute to run the action.
  6. View your data in the newly created data table.

# Migration

# Preparation

From the portal, search and download the Petro.ai CLI migration tool. This is also included in the Petro.ai installation kit. The kit contains two files:

  • migrationConfig.json the configuration file that you will configure to execute the migration
  • Petro.ai CLI.zip – the new renovated core

# Configuration

The migration job is to update the Petro.ai Database to match the latest schema changes. The migration job file is short and consists of the following configurations.

Parameter Description
“keepLegacy” If true, this keep all the previous models from the old collections and migrates to a new collection. If false, this delete all your old collections and migrates models to a new collection.
“jobName” This will be set to “migrate”

# Requirements

To execute the migration job file, you will need the following:

  • RAI.Petro.Shell.Standard.exe (Inside the Petro.ai CLI folder)
  • migrationConfig.json

# Steps to run

After you have prepared the configuration files for execution, you can now begin the migration.

# Extract the Petro.ai CLI.zip

In the Petro CLI Folder, extract Petro.ai CLI.zip to your desired location. This will be the file directory you run the CLI from.

# Modify the Migration Job

  1. Open the migrationConfig.json and modify if you want to keep legacy.
  2. Save changes before running.

# Running the Migration Job from the CLI

Petro.ai currently only performs migrations from the command-line interface.

Open the CLI in the RAI.Petro.Shell.Standard.exe directory. This should be where you extracted your file from the previous step. In the CLI, input the following

> RAI.Petro.Shell.Standard.exe --run-job --job-file="\<JSON Job File URI\>" --repo=\<DB Connection String\> -n\<DB Collection Name\>

Example

> RAI.Petro.Shell.Standard.exe --run-job --job-file="C:\Users\PetroUser\Desktop\migrationConfig.json" --repo="mongodb://localhost:27017" -n petroai_migration