# GlobalParticipant

_Last Revision:20th March 2021_

This document is about the GlobalParticipant node in the knowledge graph implemented using Neo4j Graph Database.

## Why GlobalParticipant entity exists?

A GlobalParticipant is a unique representation of an Artist/Band across multiple labels. Over an artist’s lifetime, they engage with multiple labels, sign a variety of deals to distribute their content. To group up their content across these labels and present it back to our audience via Insights and OrchardGo, we introduced the concept of a GlobalParticipant.

## How a GlobalParticipant node is created?

- [Participant Statistics](https://docs.google.com/spreadsheets/d/108l0iRAs624nl-cIAMbEA6C56_uq9VNpd9oFJlT8UOc/edit#gid=0)

- GlobalPrticipant nodes are created on a daily basis from Chartmetric data.

- Jenkins Job - [https://scheduler.theorchard.io/job/swf-cm-participants-exec/](https://scheduler.theorchard.io/job/swf-cm-participants-exec/)

- ETL code - [https://github.com/theorchard/swf-feed-ingestion/blob/70fd964aa55c80312711cb883cd069dc556da0bd/feed_ingestion/flows/chartmetric_participants/queries/ingest_participants.cypher#L37-L50](https://github.com/theorchard/swf-feed-ingestion/blob/70fd964aa55c80312711cb883cd069dc556da0bd/feed_ingestion/flows/chartmetric_participants/queries/ingest_participants.cypher#L37-L50)

- Uniqueness of the nodes is based on Spotify Artist Id. Besides the nodes also have auto-generated unique id property.

- The nodes are linked with Chartmetic data in the moment of creation. With private data it’s linked when a Spotify Artist Id provided to LabelParticipant node and it matches with an existing GlobalParticipant node.

- Some artists have multiple Spotify Ids. In this case such artists will have multiple GlobalParticipant nodes. These different representations of the same artists can be linked between each other with MERGED_TO relationship. The process of the linking is not automated, and currently is done by DB PRs ([example](https://github.com/theorchard/database/blob/2ecca2bc582297b0410077cf0082ec2c3c087d39/neo4j/neo4j-orchard/build/changelog/dml/ARTARCH-354_merge_global_participant_duplicates.xml))

- Country code is retrieved from Chartmetric data

- Imprint/Label Name is retrieved from the first imprint/label to release the content internally else Spotify via Chartmetric, else Apple via Chartmetric, else Chartmetric.

## Entity Relation diagram for GlobalParticipant

![ER Diagram for GlobalParticipant](images/global-participant-er-diagram.png)
