Pycelonis Script : merge Analysis sheet from two different Analyses

Dear all,

If you already know, could you share your idea how to merge Analysis sheet from two different Analyses ?

I am managing template Analyses topic by topic (On-time delivery, Segregation of Duty etc.), and my client want to merge some of them and see the combined analysis.

I could copy analysis to text (JSON) file and could load back to Celonis as backup procedure. So I imagine I can do above when I copy to text, merge text and load back to Celonis.

Best regards,

Hi Kazuhiko,

maybe the pycelonis helps in that case. You could check whether the following article provides you support in that case:

In case you already have the analysis in the same team, I would probably go for the solution you proposed.



Dear Justin,

Thanks for your reply. I read this case study and enhanced my function below.

Best regards,

def merge_analysis(analysis_original, analysis_merged, analysis_new_name):
    Merge two analyses and create new analysis as draft version.
    All features except for images are merged.

    analysis_original : :class:`Analysis`
        To be copied all features
    analysis_merged : :class:`Analysis`
        To be copied formulas, variables, sheets, color mappings, palettes
    analysis_new_name : str
        name of new Analysis

        The newly created Analysis

    # create empty analysis
    analysis_new = workspace.create_analysis(analysis_new_name)
    # inherit feature of original ananlysis['document'] =['document']
    # merge formulas
    formulas = analysis_original._saved_formula_data + analysis_merged._saved_formula_data
    for f in formulas:
    # merge variables
    variables =['document']['variables'] +['document']['variables']['document']['variables'] = variables
    # merge sheets
    sheets =['document']['components'] +['document']['components']['document']['components'] = sheets
    # merge color mappings
    colorMappings =['document']['colorMappings'] +['document']['colorMappings']['document']['colorMappings'] = colorMappings
    # merge palettes
    palettes =['document']['palettes'] +['document']['palettes']['document']['palettes'] = palettes
    # return new analysis
    return analysis_new

thanks for your input. I will discuss with my colleagues and see if we can include something like this in our next pycelonis release!.
Best Regards,


1 Like