> For the complete documentation index, see [llms.txt](https://docs.therisk.global/nexus-paradigm/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.therisk.global/nexus-paradigm/global-risks-index-grix/common-data-model/fundamentals/manifest.md).

# Manifest

The **Global Risks Index (GRIx)** is an integrated framework designed to assess and manage risks across the water-health-food-energy nexus. It encompasses a wide array of risk categories, including financial, political, systemic, health, and climate risks. GRIx utilizes the Microsoft Common Data Model (CDM) to ensure seamless data integration, interoperability, and scalability. A pivotal component of CDM, the **Manifest object**, serves as the organizational backbone, enabling GRIx to manage complex datasets and their interrelationships effectively.

***

### Understanding the Manifest Object

#### Definition and Purpose

In GRIx, a **Manifest object** represents a comprehensive directory that organizes and manages related data files and schema descriptions within a data lake. It acts as an entry point, delineating the structure and interconnections of various entities essential for risk assessment and management. Each Manifest document (`*.manifest.cdm.json`) encapsulates a collection of entities, their schemas, data partitions, relationships, and submanifests, thereby forming a cohesive solution tailored to specific risk domains or analytical purposes.

#### Structure of a Manifest Document

A typical Manifest document in GRIx encompasses the following key components:

1. **Version Information**
2. **Imports**
3. **Manifest Definition**
4. **Entity Lists**
5. **Relationship Lists**
6. **Submanifest Lists**

Each component plays a crucial role in defining how data is organized, accessed, and interrelated within the GRIx ecosystem.

***

### Imports in a Manifest

**Imports** in a Manifest allow GRIx to reference and utilize definitions from other CDM documents, promoting reusability and modularity. By importing foundational and common definitions, the Manifest ensures consistency and adherence to standardized schemas across various risk domains.

**Example Import Statement:**

```json
{
  "imports": [
    {
      "corpusPath": "cdm:/commonDefinitions.cdm.json"
    },
    {
      "corpusPath": "cdm:/foundations.cdm.json"
    },
    {
      "corpusPath": "cdm:/grixRiskEntities.cdm.json"
    }
  ]
}
```

In this example, the Manifest imports common definitions, foundational schemas, and GRIx-specific risk entities, establishing a robust base for subsequent data definitions and relationships.

***

### Shared Concepts Inside the Manifest

The Manifest object and the entities it contains share several properties and functionalities that ensure uniformity and interoperability within GRIx:

* **Entity Names and Paths:** Standardized naming conventions and corpus paths facilitate easy reference and management of entities.
* **Data Partitions:** Organized collections of data files associated with each entity, enabling efficient data retrieval and analysis.
* **Traits and Annotations:** Metadata annotations that define behaviors, formats, and relationships, enhancing the semantic richness of the data.
* **Version Control:** Embedded version information ensures backward compatibility and smooth schema evolution.

***

### Entity Lists in a Manifest

Entity lists within a Manifest represent collections of related entities, organized to serve specific analytical or operational purposes within GRIx. These entities can either be **owned** by the Manifest or **referenced** from external Manifests.

#### Local Entity Declaration

Entities that are **owned** by the Manifest are fully managed within its scope. The Manifest specifies the location of the entity's schema document, the data partitions containing the entity's records, and any partition patterns used to discover new data files.

**Properties of Local Entity Declaration:**

| **Property / Method**          | **Description**                                                                                                                                                                            | **SDK Version** |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------- |
| `entityName`                   | The name of the owned entity (e.g., `RiskEntity`).                                                                                                                                         | 1.0             |
| `entityPath`                   | A corpus path to the entity definition within its containing document (e.g., `local:/RiskData/RiskEntity.cdm.json/RiskEntity`). This should be the resolved form of the entity definition. | 1.0             |
| `dataPartitions`               | Collection of dataPartition objects, each describing the location, format, and details of a data file for the entity.                                                                      | 1.0             |
| `dataPartitionPatterns`        | Collection of dataPartitionPatterns objects used to discover and describe new partition files based on defined patterns.                                                                   | 1.0             |
| `incrementalPartitions`        | Collection of incremental dataPartition objects for entities that receive periodic updates.                                                                                                | 1.6             |
| `incrementalPartitionPatterns` | Collection of incremental dataPartitionPatterns objects for discovering and managing incremental data files.                                                                               | 1.6             |

**Example Local Entity Declaration:**

```json
{
  "entityName": "RiskEntity",
  "entityPath": "RiskData/RiskEntity.cdm.json/RiskEntity",
  "dataPartitions": [
    {
      "location": "RiskData/2023/Q1/risk_records.csv",
      "exhibitsTraits": [
        {
          "traitReference": "is.partition.format.CSV",
          "arguments": [
            {
              "name": "columnHeaders",
              "value": "true"
            },
            {
              "name": "delimiter",
              "value": ","
            }
          ]
        }
      ]
    }
  ],
  "dataPartitionPatterns": [
    {
      "name": "QuarterlyRiskDataPattern",
      "rootLocation": "RiskData/",
      "regularExpression": "2023/Q(\\d)/risk_records\\.csv$",
      "parameters": [
        "quarter"
      ]
    }
  ]
}
```

#### Referenced Entity Declaration

Entities that the Manifest references are managed externally. The Manifest lists these entities without owning their data partitions, allowing GRIx to **borrow** entities from other solutions or Manifests.

**Properties of Referenced Entity Declaration:**

<table data-header-hidden><thead><tr><th width="223"></th><th></th></tr></thead><tbody><tr><td><strong>Property / Method</strong></td><td><strong>Description</strong></td></tr><tr><td><code>entityName</code></td><td>The name of the referenced entity (e.g., <code>Person</code>).</td></tr><tr><td><code>entityPath</code></td><td>A corpus path to the entity declaration within the referenced Manifest document (e.g., <code>remote:/OtherSolution/default.manifest.cdm.json/Person</code>).</td></tr></tbody></table>

**Example Referenced Entity Declaration:**

```json
{
  "entityName": "Person",
  "entityPath": "remote:/OtherSolution/default.manifest.cdm.json/Person"
}
```

In this example, the `Person` entity is borrowed from an external Manifest, allowing GRIx to utilize its schema and data without direct ownership.

***

### The SubManifest Object

**SubManifests** allow GRIx to create hierarchical and modular structures within its data lake. By nesting SubManifests within a primary Manifest, GRIx can organize related solutions or extensions, facilitating scalability and manageability.

**Properties of SubManifest:**

<table data-header-hidden><thead><tr><th width="230"></th><th></th></tr></thead><tbody><tr><td><strong>Property / Method</strong></td><td><strong>Description</strong></td></tr><tr><td><code>definition</code></td><td>The corpus path to the SubManifest's <code>*.manifest.cdm.json</code> document (e.g., <code>waterProject/WaterManifest.cdm.json</code>).</td></tr></tbody></table>

**Example SubManifest Declaration:**

```json
{
  "subManifests": [
    {
      "name": "WaterHealthFoodEnergyNexus",
      "definition": "NexusSolutions/WaterHealthFoodEnergy.manifest.cdm.json"
    }
  ]
}
```

In this example, the `WaterHealthFoodEnergyNexus` SubManifest encapsulates entities and data pertinent to the interconnected domains of water, health, food, and energy, maintaining a logical separation within the broader GRIx framework.

***

### Entity Relationships

Understanding and managing **entity-to-entity relationships** is crucial for comprehensive risk analysis in GRIx. These relationships define how different entities interact and influence each other, enabling holistic risk assessments across multiple domains.

**Relationship Properties:**

<table data-header-hidden><thead><tr><th width="285"></th><th></th></tr></thead><tbody><tr><td><strong>Property</strong></td><td><strong>Description</strong></td></tr><tr><td><code>fromEntity</code></td><td>A corpus path to the referencing entity (e.g., <code>RiskData/RiskEntity.cdm.json/RiskEntity</code>).</td></tr><tr><td><code>fromEntityAttribute</code></td><td>The attribute in the referencing entity that acts as a foreign key (e.g., <code>personId</code>).</td></tr><tr><td><code>toEntity</code></td><td>A corpus path to the referenced entity (e.g., <code>PersonData/Person.cdm.json/Person</code>).</td></tr><tr><td><code>toEntityAttribute</code></td><td>The attribute in the referenced entity that acts as a primary key (e.g., <code>id</code>).</td></tr><tr><td><code>name</code></td><td>The name of the relationship (e.g., <code>RiskEntity_PersonRelationship</code>).</td></tr><tr><td><code>exhibitsTraits</code></td><td>Collection of traits that define additional semantics or behaviors for the relationship.</td></tr></tbody></table>

**Example Relationship Declaration:**

```json
{
  "relationships": [
    {
      "fromEntity": "RiskData/RiskEntity.cdm.json/RiskEntity",
      "fromEntityAttribute": "personId",
      "toEntity": "PersonData/Person.cdm.json/Person",
      "toEntityAttribute": "id",
      "name": "RiskEntity_PersonRelationship",
      "exhibitsTraits": [
        {
          "traitReference": "means.referencing.attribute",
          "arguments": [
            {
              "name": "relationshipName",
              "value": "RiskOwner"
            }
          ]
        }
      ]
    }
  ]
}
```

In this example, the `RiskEntity` references the `Person` entity through the `personId` attribute, establishing a relationship that identifies the owner of a specific risk.

***

### File Status Check and Modification Times

The Manifest object in GRIx maintains metadata about file statuses and modification times to ensure data integrity and facilitate efficient data management.

**Key Properties:**

<table data-header-hidden><thead><tr><th width="306"></th><th width="354"></th><th></th></tr></thead><tbody><tr><td><strong>Property / Method</strong></td><td><strong>Description</strong></td><td><strong>SDK Version</strong></td></tr><tr><td><code>LastFileStatusCheckTime</code></td><td>The last time the Manifest checked the status of its files and child objects.</td><td>1.0</td></tr><tr><td><code>LastFileModifiedTime</code></td><td>The last time any file within the Manifest was modified.</td><td>1.0</td></tr><tr><td><code>LastChildFileModifiedTime</code></td><td>The latest modification time reported by any child object within the Manifest.</td><td>1.0</td></tr></tbody></table>

**File Status Check Methods:**

<table data-header-hidden><thead><tr><th width="163"></th><th width="176"></th><th width="292"></th><th></th></tr></thead><tbody><tr><td><strong>Object</strong></td><td><strong>Method</strong></td><td><strong>Description</strong></td><td><strong>SDK Version</strong></td></tr><tr><td><code>Manifest</code></td><td><code>fileStatusCheck</code></td><td>Checks the Manifest, all entity declarations, and all SubManifests.</td><td>1.0</td></tr><tr><td><code>Local entity</code></td><td><code>fileStatusCheck</code></td><td>Checks the schema documents and all data partitions and patterns for the entity.</td><td>1.0</td></tr><tr><td><code>Referenced entity</code></td><td><code>fileStatusCheck</code></td><td>Checks the status of the remote Manifest document.</td><td>1.0</td></tr><tr><td><code>dataPartition</code></td><td><code>fileStatusCheck</code></td><td>Checks the file indicated by the data partition.</td><td>1.0</td></tr><tr><td><code>dataPartitionPattern</code></td><td><code>fileStatusCheck</code></td><td>Evaluates the data partition pattern search and creates new data partitions if applicable.</td><td>1.0</td></tr><tr><td><code>incrementalPartition</code></td><td><code>fileStatusCheck</code></td><td>Checks the file indicated by the incremental partition.</td><td>1.6</td></tr><tr><td><code>incrementalPartitionPattern</code></td><td><code>fileStatusCheck</code></td><td>Evaluates the incremental data partition pattern search and creates new incremental partitions if applicable.</td><td>1.6</td></tr><tr><td><code>SubManifest</code></td><td><code>fileStatusCheck</code></td><td>Checks the files of SubManifests.</td><td>1.0</td></tr></tbody></table>

**Example Usage:**

```json
{
  "LastFileStatusCheckTime": "2024-04-20T10:00:00Z",
  "LastFileModifiedTime": "2024-04-18T15:30:00Z",
  "LastChildFileModifiedTime": "2024-04-19T12:45:00Z"
}
```

In this example, the Manifest records the last status check and modification times, aiding in monitoring data freshness and integrity.

***

### Manifest Example Document

The following example demonstrates a comprehensive Manifest document tailored for GRIx, encompassing various entities across the water-health-food-energy nexus and multiple risk categories.

**Example Manifest Document:**

```json
{
  "manifestName": "GRIxSolution",
  "jsonSchemaSemanticVersion": "0.9.0",
  "imports": [
    {
      "corpusPath": "cdm:/commonDefinitions.cdm.json"
    },
    {
      "corpusPath": "cdm:/foundations.cdm.json"
    },
    {
      "corpusPath": "cdm:/grixRiskEntities.cdm.json"
    },
    {
      "corpusPath": "cdm:/hazardDefinitions.cdm.json"
    },
    {
      "corpusPath": "cdm:/vulnerabilityDefinitions.cdm.json"
    },
    {
      "corpusPath": "cdm:/exposureDefinitions.cdm.json"
    },
    {
      "corpusPath": "cdm:/riskDefinitions.cdm.json"
    }
  ],
  "lastFileStatusCheckTime": "2024-04-25T08:00:00Z",
  "lastFileModifiedTime": "2024-04-24T14:20:00Z",
  "lastChildFileModifiedTime": "2024-04-25T07:50:00Z",
  "entities": [
    {
      "entityName": "WaterQualityRisk",
      "entityPath": "WaterHealthFoodEnergyNexus/Water_Risks/WaterQualityRisk.cdm.json/WaterQualityRisk",
      "dataPartitions": [
        {
          "location": "WaterHealthFoodEnergyNexus/Water_Risks/2024/Q1/water_quality_risks.csv",
          "exhibitsTraits": [
            {
              "traitReference": "is.partition.format.CSV",
              "arguments": [
                {
                  "name": "columnHeaders",
                  "value": "true"
                },
                {
                  "name": "delimiter",
                  "value": ","
                }
              ]
            }
          ]
        }
      ],
      "dataPartitionPatterns": [
        {
          "name": "QuarterlyWaterQualityRiskPattern",
          "rootLocation": "WaterHealthFoodEnergyNexus/Water_Risks/",
          "regularExpression": "2024/Q(\\d)/water_quality_risks\\.csv$",
          "parameters": [
            "quarter"
          ]
        }
      ]
    },
    {
      "entityName": "DiseaseOutbreakRisk",
      "entityPath": "WaterHealthFoodEnergyNexus/Health_Risks/DiseaseOutbreakRisk.cdm.json/DiseaseOutbreakRisk",
      "dataPartitions": [
        {
          "location": "WaterHealthFoodEnergyNexus/Health_Risks/2024/Mar/disease_outbreak_risks.csv",
          "exhibitsTraits": [
            {
              "traitReference": "is.partition.format.CSV",
              "arguments": [
                {
                  "name": "columnHeaders",
                  "value": "true"
                },
                {
                  "name": "delimiter",
                  "value": ","
                }
              ]
            }
          ]
        }
      ],
      "dataPartitionPatterns": [
        {
          "name": "MonthlyDiseaseOutbreakRiskPattern",
          "rootLocation": "WaterHealthFoodEnergyNexus/Health_Risks/",
          "regularExpression": "2024/(\\w{3})/disease_outbreak_risks\\.csv$",
          "parameters": [
            "month"
          ]
        }
      ]
    },
    {
      "entityName": "FoodSecurityRisk",
      "entityPath": "WaterHealthFoodEnergyNexus/Food_Risks/FoodSecurityRisk.cdm.json/FoodSecurityRisk",
      "dataPartitions": [
        {
          "location": "WaterHealthFoodEnergyNexus/Food_Risks/2024/Q2/food_security_risks.csv",
          "exhibitsTraits": [
            {
              "traitReference": "is.partition.format.CSV",
              "arguments": [
                {
                  "name": "columnHeaders",
                  "value": "true"
                },
                {
                  "name": "delimiter",
                  "value": ","
                }
              ]
            }
          ]
        }
      ],
      "dataPartitionPatterns": [
        {
          "name": "QuarterlyFoodSecurityRiskPattern",
          "rootLocation": "WaterHealthFoodEnergyNexus/Food_Risks/",
          "regularExpression": "2024/Q(\\d)/food_security_risks\\.csv$",
          "parameters": [
            "quarter"
          ]
        }
      ]
    },
    {
      "entityName": "EnergySupplyRisk",
      "entityPath": "WaterHealthFoodEnergyNexus/Energy_Risks/EnergySupplyRisk.cdm.json/EnergySupplyRisk",
      "dataPartitions": [
        {
          "location": "WaterHealthFoodEnergyNexus/Energy_Risks/2024/Q3/energy_supply_risks.csv",
          "exhibitsTraits": [
            {
              "traitReference": "is.partition.format.CSV",
              "arguments": [
                {
                  "name": "columnHeaders",
                  "value": "true"
                },
                {
                  "name": "delimiter",
                  "value": ","
                }
              ]
            }
          ]
        }
      ],
      "dataPartitionPatterns": [
        {
          "name": "QuarterlyEnergySupplyRiskPattern",
          "rootLocation": "WaterHealthFoodEnergyNexus/Energy_Risks/",
          "regularExpression": "2024/Q(\\d)/energy_supply_risks\\.csv$",
          "parameters": [
            "quarter"
          ]
        }
      ]
    },
    {
      "entityName": "FinancialRisk",
      "entityPath": "FinancialRisks/FinancialRisk.cdm.json/FinancialRisk",
      "dataPartitions": [
        {
          "location": "FinancialRisks/2024/Q1/financial_risks.csv",
          "exhibitsTraits": [
            {
              "traitReference": "is.partition.format.CSV",
              "arguments": [
                {
                  "name": "columnHeaders",
                  "value": "true"
                },
                {
                  "name": "delimiter",
                  "value": ","
                }
              ]
            }
          ]
        }
      ],
      "dataPartitionPatterns": [
        {
          "name": "QuarterlyFinancialRiskPattern",
          "rootLocation": "FinancialRisks/",
          "regularExpression": "2024/Q(\\d)/financial_risks\\.csv$",
          "parameters": [
            "quarter"
          ]
        }
      ]
    }
  ],
  "relationships": [
    {
      "fromEntity": "WaterHealthFoodEnergyNexus/Water_Risks/WaterQualityRisk.cdm.json/WaterQualityRisk",
      "fromEntityAttribute": "locationId",
      "toEntity": "GeographyData/Geography.cdm.json/Geography",
      "toEntityAttribute": "id",
      "name": "WaterQualityRisk_GeographyRelationship",
      "exhibitsTraits": [
        {
          "traitReference": "means.referencing.attribute",
          "arguments": [
            {
              "name": "relationshipName",
              "value": "LocatedIn"
            }
          ]
        }
      ]
    },
    {
      "fromEntity": "WaterHealthFoodEnergyNexus/Health_Risks/DiseaseOutbreakRisk.cdm.json/DiseaseOutbreakRisk",
      "fromEntityAttribute": "healthFacilityId",
      "toEntity": "HealthFacilities/HealthFacility.cdm.json/HealthFacility",
      "toEntityAttribute": "id",
      "name": "DiseaseOutbreakRisk_HealthFacilityRelationship",
      "exhibitsTraits": [
        {
          "traitReference": "means.referencing.attribute",
          "arguments": [
            {
              "name": "relationshipName",
              "value": "HostedAt"
            }
          ]
        }
      ]
    },
    {
      "fromEntity": "FinancialRisks/FinancialRisk.cdm.json/FinancialRisk",
      "fromEntityAttribute": "sectorId",
      "toEntity": "Sectors/Sector.cdm.json/Sector",
      "toEntityAttribute": "id",
      "name": "FinancialRisk_SectorRelationship",
      "exhibitsTraits": [
        {
          "traitReference": "means.referencing.attribute",
          "arguments": [
            {
              "name": "relationshipName",
              "value": "Affects"
            }
          ]
        }
      ]
    }
  ],
  "subManifests": [
    {
      "name": "NexusSolutions",
      "definition": "NexusSolutions/NexusSolutions.manifest.cdm.json"
    },
    {
      "name": "FinancialSolutions",
      "definition": "FinancialSolutions/FinancialSolutions.manifest.cdm.json"
    }
  ]
}
```

**Explanation of the Example:**

* **Imports:** The Manifest imports common definitions, foundational schemas, GRIx-specific risk entities, and definitions for hazards, vulnerabilities, exposure, and risks.
* **Entities:** Defines various risk entities across the water-health-food-energy nexus and financial risks, each with their respective data partitions and partition patterns.
* **Relationships:** Establishes connections between risk entities and other entities like Geography, HealthFacility, and Sector.
* **SubManifests:** Incorporates SubManifests for modular solutions, allowing for scalable and organized data management within GRIx.

***

The **Manifest object** is a cornerstone of the GRIx framework, enabling structured and efficient management of complex risk data across multiple domains. By leveraging CDM's Manifest capabilities, GRIx ensures that data related to hazards, vulnerabilities, exposure, and risks is systematically organized, easily accessible, and interconnected. This structured approach facilitates comprehensive risk assessments, advanced modeling, and informed decision-making within the intricate water-health-food-energy nexus and beyond.

By adhering to the principles and best practices outlined in this document, organizations can effectively implement the Manifest object within GRIx, ensuring robust data governance, scalability, and interoperability in their global risk management endeavors.

***

### Further Reading and Resources

* [Common Data Model Repository on GitHub](https://github.com/microsoft/CDM)
* [Microsoft Common Data Model Documentation](https://docs.microsoft.com/en-us/common-data-model/)
* [Azure Data Factory Documentation](https://docs.microsoft.com/en-us/azure/data-factory/)
* [Azure Purview Documentation](https://docs.microsoft.com/en-us/azure/purview/)
* [Power BI Documentation](https://docs.microsoft.com/en-us/power-bi/)
* [Azure Machine Learning Documentation](https://docs.microsoft.com/en-us/azure/machine-learning/)
* [Qiskit Documentation](https://github.com/Qiskit/documentation)
* [SHAP Documentation](https://shap.readthedocs.io/en/latest/)
* [LIME Documentation](https://lime-ml.readthedocs.io/en/latest/)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.therisk.global/nexus-paradigm/global-risks-index-grix/common-data-model/fundamentals/manifest.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
