Use Case 2: Build a Programs DB from GVD API
Note: For instructional purposes, the use cases described below use GVD API queries to retrieve and navigate data. For real-world applications, you should populate your databases using the instructions in Getting Seed Data and Updates and map primary database keys to IDs based on instructions in Mapping GNIDs to Primary Database Keys. Then use standard database queries to retrieve and navigate GVD data.
Also, the GNIDs used in this use case are for explanation only. They may change if the element becomes inactive or is deleted.
Language Contexts for India
Using India as example, the following languages are relevant to India market and the context values are available in the country XML.
| Context | Language | Context | Language |
|---|---|---|---|
CTX_L_as | Assamese | CTX_L_ml | Malayalam |
CTX_L_bgc | Haryanvi | CTX_L_mni | Manipuri |
CTX_L_bho | Bhojpuri | CTX_L_ne | Nepali |
CTX_L_bn | Bengali | CTX_L_or | Oriya |
CTX_L_en | English | CTX_L_pa | Punjabi |
CTX_L_gbm | Garhwali | CTX_L_raj | Rajasthani |
CTX_L_gu | Gujarati | CTX_L_sa | Sanskrit |
CTX_L_hi | Hindi | CTX_L_si | Sinhala |
CTX_L_kn | Kannada | CTX_L_ta | Tamil |
CTX_L_kok | Konkani | CTX_L_te | Telugu |
CTX_L_ks | Kashmiri | CTX_L_ur | Urdu |
Process
1. Extract Programs Metadata
Extract the programs metadata for the languages listed above from the XID System "WOI". This is most suitable for India (CTR_IND). See Country CVs, GNIDs, and XIDs.
Note: English is a widely spoken language in India, and Popular US/UK content (Movies/Series) is very much applicable to this market due to coverage of international channels. A lot of regional language programs (e.g.: Hindi) are also edited in English.
Example: "3 Idiots"
Program GNID: GNC1R7DTQ5KDRGQ
Code
2. Handle Language Variants
All language variants of this program are assigned with a program context value if the titles/descriptions are edited in a specific regional. e.g.: CTX_L_hi (Hindi).
3. Manage Program Duplicates
Due to the nature of sourcing for this market, there may be some duplication in Programs, i.e., two versions of the same program. This is purely based on the broadcasting channel/source. So, the dataset is best suited for a TV schedules use-case in which a schedule is pointing to a specific program at any given instance.
To build a DB for the popular programs, Gracenote recommends choosing the program that has good coverage for core metadata, such as Titles, Descriptions, Imagery, Year, etc. The same applies for Cast and Crew information.
4. Example: Program Version Comparison
Two versions of the MOVIE: Kaala
Version 1: GN8VHD2H64Y1SVZ (Root: GNF302XPN4D1CX4)
- Program Type: MOVIE
- Release Year: 2018
- Cast: Rajinikanth, Nana Patekar
- Image: Available
- Descriptions: Available
Version 2: GN1BK5R1N8WHWYP (Root: GN1F1YK3J7CCTWX)
- Program Type: MOVIE
- Release Year: 2018
- Cast: Rajinikanth, Nana Patekar
- Image: Not Available
- Descriptions: Available
5. Access Media and Contributors
All program images, Cast and Crew for the above programs are available in Media and Contributor XML endpoints, respectively. Similarly, you can locate Cast and Crew images in the Media endpoint.
Example Contributors:
Contributor Aamir Khan (GN7D5ZY0527JNZY) associated to program "3 Idiots" (GNC1R7DTQ5KDRGQ)
Code
Contributor Kareena Kapoor Khan (GN0QRAFXVAEM7QJ) associated to program "Chup Chup ke" (GNA6WJTG5MFKQM3)
Code
Code