IBM Apptio

Apptio

A place for Apptio product users to learn, connect, share and grow together.


#Aspera
#Apptio
#Automation
 View Only

Tag values in Azure to Apptio Schema 

Mon September 11, 2017 06:11 PM

♦ Applies to: Apptio Cost Transparency running on TBM Studio v12.3.3 or later

 

In this article:

This article will help you tag values in Azure to the Apptio Schema. While this article explains how to parse values in the Tag column of Azure's bill so that it can provide relevant tagging information in Apptio, please note that other columns within Azure, including Account, Subscription, Cost Center, and Department, can be mapped directly into Apptio. This article is intended to provide guidance into how you can map any columns or tags into Apptio from Azure.

 

Parse tag values in Azure

Resource tags are available in the Azure detailed billing file available in your EA portal and ingestible into Apptio via Datalink. These tags are encoded as a JSON-formatted string within the Tags column on the bill. Parsing the tag values into usable attributes requires some additional configuration in Apptio. This document will guide you through the steps necessary to parse desired tag values out of the JSON-formatted string and into new columns in the Apptio dataset.

 

Example:

{  "Dept": "Engineering",  "Function": "Product Development",  "Environment": "Development",  "CostCenter": "4739"}

 

The steps described below will work for a single tag and should be repeated for each tag you wish to parse out of the Tags column.

 

NOTE  Definitions used in the steps below: Every tag is comprised of a common structure called a key-value pair. With respect to tags, think of the “key” in the key-value pair as the column name and the “value” as the data stored in that column. In the example included in the steps below, we will be parsing out the values for an “Environment” tag, where the key = “Environment” and the value is the data associated with the Environment key.

 

Summary of tasks

  1. Open TBM Studio in Apptio and select Azure EA Detailed Bill Raw. Click Check out
  2. Add a Formula step.
  3. Create a new column called "Environment".
  4. Set Environment =IF(FIND("Environment", Tags)>0, split((RIGHT(Tags,LEN(Tags)-FIND("Environment", Tags)-(LEN("Environment")+2))),1,""""), "")
  5. To implement this for other tags into your Apptio environment, copy the formula in Step 2, above, and copy/replace “Environment” with whatever tag key value you want to parse out of the Tags column.
  6. Save and check in changes once all edits are completed on your workspace.

      

 

NOTES

  • The basic operation here is to find the word "Environment" and then, from two characters after its end, grabbing everything in the tags column up to the next symbol. Please also note that Apptio is case-sensitive, and therefore both the value and case needs to match.
  • Apptio recommends one column per tag. Avoid performing this operation in multiple columns because it is harder to clean up and optimize your configuration in the future, and can have a negative performance impact.

 

Map Azure tags to the Apptio schema

Once the Azure tags are parsed in the "Azure EA Detailed Bill Raw" table, these columns can now be used to map into the Apptio Schema by mapping this into the Azure EA Detailed Bill Master Data set. Please note that you can follow the below steps to also map other Azure columns (Account, Subscription, Cost Center, Department, etc.).

 

To map Azure tags to the Apptio Schema:

  1. Navigate to Azure EA Detailed Bill Master Data and check it out.

  2. Edit the appending of your Azure Bill.

  3. Map the columns that were parsed from that Tag column in the previous section, and any other columns you would like to map. Below are some example columns that can be mapped:
    • Application
    • Cost Center
    • Environment
    • Project
    • Purpose
    • System Owner
  4. Save the mappings of the fields you just mapped.

  5. Save Azure EA Detailed Bill Master Data and check it in.

This will populate the data in the master data set as configured.

 

 (Back to top) 

 

  This topic is open for your feedback. At the bottom of this page, click Add a comment.


#CostingStandard(CT-Foundation)

Statistics
0 Favorited
8 Views
0 Files
0 Shares
0 Downloads

Comments

Thu December 15, 2022 05:02 PM

This formula assumes that the keyword only exists in the keys, not in values. For example, if you're trying to get the app tag, and the JSON looks like this: [{"environment","dr_apps"},{"app","acme.com"}]
, then you will return the "},{" after the value dr_apps, not the value acme.com after the app key.
#CostingStandard(CT-Foundation)

Mon October 29, 2018 09:45 PM

Hi,

 

I am assuming without seeing which guide you are speaking of that reference to transforms is speaking of R11 practices. While transforms do exist in R12 I believe the best practice is to modify the raw dataset using the R12 pipeline.

Cheers

Dru 


#CostingStandard(CT-Foundation)

Mon October 15, 2018 05:16 AM

Hi,

 

I've noticed from guides to earlier versions of Apptio on this subject that a transform of the data set is created instead of adding customizations to the original data set for the cloud billing data. What is best practice on this - to create a transform or to add customizations directly into the original dataset as described in this document?

 

Regards

Svein Selstø


#CostingStandard(CT-Foundation)