Insights 05: Index Patterns

PT 8.62
Randall Groncki

GitHub

In PeopleSoft Insights, an Index Pattern tells OpenSearch Dashboards which data indexes you want to work with. It can point to a single index or use a wildcard (*) to include multiple indexes at once – making it easy to pull data from across your environment. The Index Pattern also acts as the foundation for your visualizations: it’s where you can format how data fields are displayed, create scripted fields for calculated values, and generally shape how your data appears and behaves within Insights.

PeopleTools PeopleBooks – OpenSearch Dashboards Terminology

Housekeeping

I upgraded the PeopleSoft environment we use to demonstrate to HCM PUM54 since our previous post on Extracting data to OpenSearch.  Primarily, this means that we are using the updated PeopleTools 8.62 OpenSearch and Insights for our Demonstration.  The look and feel are basically the same for our purposes. 

PeopleTools 8.62 is the current release as of this blog post’s creation.

There are also small changes to our query: X_PT3_TRAINING_DATA

  • The Drilling URL no longer populates the Portal and Node fields.  These are not required and created issues when importing the query into other environments with different primary node names.
  • The Query now returns 241 rows of data due to the updated data in PUM54.   (In the previous environment, it returned 237 rows.) 
  • The COURSE_DURATION field (in days) is now four places, not one.
  • The changes to this query are in the tools project attached to this blog post and on our GitHub site

Prerequisites to this post

Before creating an Index Pattern, you must have already:

Create an Insights Index Pattern

Navigate to Insights: Home > Reporting Tools > Insights

Then in Insights Navigate: Home > Dashboards Management > Index Patterns

Our Index Pattern Home Page lists all the index patterns available.

Click on the “Create Index Pattern” button

Start typing in the name of the Search Definition you created for this data.  Type in the full, exact name of your search definition so we can uniquely define the data in this Search index to only include the data from our query. 

In our case, we will type:

x_pt3_training*

Note that the sources that match in the lower box has the environment name appended to the end of the Search Definition Name.   The OpenSearch server can serve multiple environments: this is how it keeps track of where the indexes originated.   We want to maintain the wildcard (*) at the end of the search definition name so that this Index Pattern will match the same index in other environments these objects are migrated.

When you have your index pattern and match as shown, click the “Next Step” button.

On the next screen, choose the “I don’t want to use the time filter” in step 2 of the configuration.   This field allows the index to use a date or datetime field such as EFFDT to filter everything in the index.   This is an advanced subject we’ll cover in a later post.   For now, choose not to use a time filer.

Click the “Create index pattern” button.  

Your index pattern is displayed on the next page.

You’re Done!

That’s it.  

You have the minimal configuration needed to start creating Visualizations and Dashboards with your data.

Does it have Data?

Navigate to the “Discover” page to see the data in your index.

Navigate in Insights: Home > Discover

Then, choose your index from the drop-down menu at the top

The page loads all the documents in that index. 

We see from the data box at the top that there are “241 hits” in this index.  

This number matches the 241 rows returned by our Query.  

If this number is less than your Query count, it usually means that your Query’s drilling index did not create unique drilling URLs for every row returned.   See our blog post “Are you missing data in your Insights Dashboards?” for more information on how to make these unique and see all your data.

Formatting Dates and URLs

Formatting fields is not required, but you may want to format some of your data before displaying it in a Visualization. 

Default Date Formats

All Date and Datetime fields default to the above format to include hours, minutes and milliseconds.  Even a date-only field, such as EFFDT, will show the full format to milliseconds.  

Here is how to format a date field to a more user-friendly format.

Navigate back to the Index Pattern.  Choose your index pattern from the list.

Inside Insights: Home > Dashboards Management > Index Patterns

Find your date field in the list and click on the Edit icon

In the format box, choose the type “Date”

Then in the pattern box, input your date formatting string.   I prefer the “YYYY-MM-DD” format.  This makes comparing multiple dates on the page a little easier.  In the lower “Samples” section, Insights will display examples of how the dates will format given your format string.

Click “Save Field” and we see that our field now has a format applied.

Test your dates carefully in your Visualizations.   If you find that all your dates seem to be off by one day, refer to our post about Date Issues for a way to correct this problem.

Formatting URLs

See our post for more details about formatting URLs in Insights

Insights can display working URLs in the data tables.   However, if we don’t format the URL and declare it a link in the Index pattern, the user will just see the raw, unclickable html link as plain text.

To format the URL as a live link, edit its format in the Index Pattern

Navigate back to the Index Pattern. 

Inside Insights: Home > Dashboards Management > Index Patterns

Choose your index pattern from the list.

Find your URL field in the list and click on the Edit icon

In the format box, choose the type “Link”

Then, in the “Label Template” field, type in a description of hold your link.

The “Samples” section below shows how your field will appear in an Insights Data Table.

Click “Save Field”.   We can then see our URL field has our format in the field list.

Now, in our data table, we can see our link looking and acting as a link

PT3 Bog Posts about Index Patterns

Refresh Insights Index Patterns

Format Numbers in Insights Dashboards

Insights Date Issues

Add URLs to Insights Dashboards

Add a PSQuery to Insights Data Tables

Are you missing data in your Insights Dashboards?

Combine fields for Insights Dashboards

Next

In our next blog and video, I’ll demonstrate importing and exporting Insights Objects to Json files for migration and backup.

Randall Groncki

Oracle ACE ♠ PeopleTools Developer since 1996 Lives in Northern Virginia, USA

View all posts by Randall Groncki →

Leave a Reply

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