Quantcast
Channel: Data Preparation & Blending discussions
Viewing all articles
Browse latest Browse all 4999

Cleaning and Parsing

$
0
0

Hi 

 

I have currently have input in this format , Have more than 10K + rows , Just showing an example 

Example 1 Input : 

 

 

([PS Customer Lifecycle].[none:project_number:nk] / ([PS Customer Lifecycle].[none:project_name:nk] / ([PS Customer Lifecycle].[none:wbs_user_status:nk] / ([PS Customer Lifecycle].[none:proj_program_delivery_manager_name:nk] 

 

Expected Result :

 

 

[PS Customer Lifecycle].[project],[PS Customer Lifecycle].[project_name],[PS Customer Lifecycle].[wbs_user_status],[PS Customer Lifecycle].[proj_program_delivery_manager_name]

 

 

 

 

 

Example 2 Input  

 

 

([greenplum.41719.542383587963].[sum:lead_count:qk] + ([greenplum.41719.542383587963].[sum:opp_count:qk] + ([greenplum.41719.542383587963].[sum:book_num:qk] + [greenplum.41719.542383587963].[sum:total_booked:qk])))

Expected Output :

 

 

[greenplum.41719.542383587963].[Sum(lead_count)],[greenplum.41719.542383587963].[Sum(opp_count)],[greenplum.41719.542383587963].[Sum(book_num)],[greenplum.41719.542383587963].[sum(total_booked)]

 

 

Let's take an example ,I basically need to clean the stuff after period which is

 [none:project:nk]

,

 

Input: 

[PS Customer Lifecycle].[none:project_number:nk]

 

Output:

if we have none , we just take the value after the first colon , However if we have anything other than none we take that into consideration.

 

[PS Customer Lifecycle].[project]

 

I have achieved the output for one variable using Split , But I have multiple variables separated by ( /, + )

 

Any Help is appreciated on How to dynamically have one formula to take both the scenario

 

Thanks

Karthik


Viewing all articles
Browse latest Browse all 4999

Trending Articles