{
  "type": "record",
  "Aspect": {
    "name": "semanticModelInfo",
    "schemaVersion": 5
  },
  "name": "SemanticModelInfo",
  "namespace": "com.linkedin.pegasus2avro.semanticmodel",
  "fields": [
    {
      "Searchable": {
        "fieldType": "KEYWORD"
      },
      "java": {
        "class": "com.linkedin.pegasus2avro.common.url.Url",
        "coercerClass": "com.linkedin.pegasus2avro.common.url.UrlCoercer"
      },
      "type": [
        "null",
        "string"
      ],
      "name": "externalUrl",
      "default": null,
      "doc": "URL where the reference exist"
    },
    {
      "Searchable": {
        "boostScore": 10.0,
        "enableAutocomplete": true,
        "fieldNameAliases": [
          "_entityName"
        ],
        "fieldType": "WORD_GRAM",
        "searchLabel": "entityName",
        "searchTier": 1
      },
      "type": "string",
      "name": "name",
      "doc": "Display name of the semantic model."
    },
    {
      "Searchable": {
        "fieldType": "TEXT",
        "hasValuesFieldName": "hasDescription",
        "searchTier": 2
      },
      "type": [
        "null",
        "string"
      ],
      "name": "description",
      "default": null,
      "doc": "Human-readable description of the semantic model."
    },
    {
      "Searchable": {
        "/time": {
          "fieldName": "createdAt",
          "fieldType": "DATETIME",
          "searchLabel": "createdAt"
        }
      },
      "type": [
        "null",
        {
          "type": "record",
          "name": "AuditStamp",
          "namespace": "com.linkedin.pegasus2avro.common",
          "fields": [
            {
              "type": "long",
              "name": "time",
              "doc": "When did the resource/association/sub-resource move into the specific lifecycle stage represented by this AuditEvent."
            },
            {
              "java": {
                "class": "com.linkedin.pegasus2avro.common.urn.Urn"
              },
              "type": "string",
              "name": "actor",
              "doc": "The entity (e.g. a member URN) which will be credited for moving the resource/association/sub-resource into the specific lifecycle stage. It is also the one used to authorize the change.",
              "Urn": "Urn"
            },
            {
              "java": {
                "class": "com.linkedin.pegasus2avro.common.urn.Urn"
              },
              "type": [
                "null",
                "string"
              ],
              "name": "impersonator",
              "default": null,
              "doc": "The entity (e.g. a service URN) which performs the change on behalf of the Actor and must be authorized to act as the Actor.",
              "Urn": "Urn"
            },
            {
              "type": [
                "null",
                "string"
              ],
              "name": "message",
              "default": null,
              "doc": "Additional context around how DataHub was informed of the particular change. For example: was the change created by an automated process, or manually."
            }
          ],
          "doc": "Data captured on a resource/association/sub-resource level giving insight into when that resource/association/sub-resource moved into a particular lifecycle stage, and who acted to move it into that specific lifecycle stage."
        }
      ],
      "name": "created",
      "default": null,
      "doc": "Audit stamp capturing when this semantic model was created and by whom\n(as reported by the source platform / ingestor)."
    },
    {
      "Searchable": {
        "/time": {
          "fieldName": "lastModifiedAt",
          "fieldType": "DATETIME",
          "searchLabel": "lastModifiedAt"
        }
      },
      "type": [
        "null",
        "com.linkedin.pegasus2avro.common.AuditStamp"
      ],
      "name": "lastModified",
      "default": null,
      "doc": "Audit stamp capturing when this semantic model was last modified and by whom.\nEquals `created` when no modification has occurred since ingestion."
    },
    {
      "type": [
        "null",
        "string"
      ],
      "name": "nativeDefinition",
      "default": null,
      "doc": "The raw, native definition of this semantic model as authored on the\nsource platform (e.g. the Snowflake `CREATE SEMANTIC VIEW` DDL, the\ndbt `semantic_model` YAML, or the Databricks `CREATE METRIC VIEW`\nDDL). Preserved verbatim so consumers can round-trip / debug against\nthe original source; not itself parsed by DataHub."
    },
    {
      "Relationship": {
        "/*": {
          "entityTypes": [
            "dataset"
          ],
          "isLineage": true,
          "name": "Contains"
        }
      },
      "Searchable": {
        "/*": {
          "fieldName": "datasets",
          "fieldType": "URN",
          "hasValuesFieldName": "hasDatasets",
          "queryByDefault": false
        }
      },
      "type": {
        "type": "array",
        "items": "string"
      },
      "name": "datasets",
      "default": [],
      "doc": "The logical datasets that this semantic model exposes. Each is a `dataset` entity in its\nown right, carrying the `Semantic Model Dataset` subtype and a `semanticModelProperties` aspect\n(alias + back-reference to this semantic model). Field-level projection and semantics live\non that Dataset's `schemaMetadata` (structural) and per-field `semanticFieldAnnotation`\n(semantic) aspects.",
      "Urn": "Urn",
      "urn_is_array": true
    },
    {
      "type": [
        "null",
        {
          "type": "array",
          "items": {
            "type": "record",
            "name": "SemanticModelRelationship",
            "namespace": "com.linkedin.pegasus2avro.semanticmodel",
            "fields": [
              {
                "type": [
                  "null",
                  "string"
                ],
                "name": "name",
                "default": null,
                "doc": "Optional human-readable name for this relationship."
              },
              {
                "type": "string",
                "name": "from",
                "doc": "Alias of the source dataset (as declared in that Dataset's semanticModelProperties.alias)."
              },
              {
                "type": {
                  "type": "array",
                  "items": "string"
                },
                "name": "fromColumns",
                "doc": "Column names on the source side of the join."
              },
              {
                "type": "string",
                "name": "to",
                "doc": "Alias of the target dataset (as declared in that Dataset's semanticModelProperties.alias)."
              },
              {
                "type": {
                  "type": "array",
                  "items": "string"
                },
                "name": "toColumns",
                "doc": "Column names on the target side of the join."
              },
              {
                "type": [
                  "null",
                  {
                    "type": "record",
                    "Aspect": {
                      "name": "aiContext",
                      "schemaVersion": 1
                    },
                    "name": "AiContext",
                    "namespace": "com.linkedin.pegasus2avro.common",
                    "fields": [
                      {
                        "type": [
                          "null",
                          {
                            "type": "array",
                            "items": "string"
                          }
                        ],
                        "name": "synonyms",
                        "default": null,
                        "doc": "Alternative names or abbreviations by which this entity is known."
                      },
                      {
                        "type": [
                          "null",
                          "string"
                        ],
                        "name": "instructions",
                        "default": null,
                        "doc": "Human-readable guidance for AI models on how to interpret this entity."
                      },
                      {
                        "type": [
                          "null",
                          {
                            "type": "array",
                            "items": "string"
                          }
                        ],
                        "name": "examples",
                        "default": null,
                        "doc": "Example values or usage patterns to ground AI reasoning."
                      },
                      {
                        "type": [
                          "null",
                          "string"
                        ],
                        "name": "customInstructions",
                        "default": null,
                        "doc": "Additional free-form instructions for AI model customisation."
                      }
                    ],
                    "doc": "AI-specific context attached to a metric, semantic model, or schema field to\nimprove disambiguation, retrieval, and generation quality (OSI ai_context shape)."
                  }
                ],
                "name": "aiContext",
                "default": null,
                "doc": "AI-specific context for improved disambiguation and retrieval."
              },
              {
                "type": [
                  "null",
                  {
                    "type": "enum",
                    "name": "ERModelRelationshipCardinality",
                    "namespace": "com.linkedin.pegasus2avro.ermodelrelation",
                    "symbols": [
                      "ONE_ONE",
                      "ONE_N",
                      "N_ONE",
                      "N_N"
                    ],
                    "doc": "Cardinality of a relationship between two datasets or logical datasets.\nUsed by both ERModelRelationship (physical) and SemanticModelRelationship\n(semantic-layer join paths). Directionality is carried by the source/from\nand destination/to fields on those records, not by this enum."
                  }
                ],
                "name": "cardinality",
                "default": null,
                "doc": "Cardinality of this join. "
              }
            ],
            "doc": "A join relationship between two logical datasets defined within a SemanticModel.\nNamed SemanticModelRelationship to avoid colliding with common relationship models."
          }
        }
      ],
      "name": "relationships",
      "default": null,
      "doc": "Join relationships between the datasets of this semantic model."
    }
  ],
  "doc": "Core information about a SemanticModel entity."
}