How to fix 'Required skill input is missing or empty. Name: 'text'_ Source: '$(/document/sections)'.

Godwint 25 Reputation points Microsoft Employee
2024-09-09T22:33:56.78+00:00

I have a lot of documents in JSON format. The JSON is shown below.

{

"document": {

"title": "Some Title",

"url": "https://example.com",

"lastModifiedDate": "2024-07-11T21:21:37.458Z",

"Geography": "Global",

"GlobalLinks": "Some Global Links",

"sections": "This is the content to be analyzed for language detection.",

"countryCode": "NA",

"countryName": "Global",

"summary": "Some summary",

"tagline": "Some tagline"

}

}

The JSON data title, sections, and summary content could be in different languages, so I have a cusotm skillset to detect language. The custom skillset code is shown below

{
  "name": "hr-json-data-lang-detection",
  "description": "Skillset for detecting language in JSON content",
  "skills": [
    {
      "@odata.type": "#Microsoft.Skills.Text.LanguageDetectionSkill",
      "name": "#1",
      "description": null,
      "context": "/document",
      "defaultCountryHint": null,
      "modelVersion": null,
      "inputs": [
        {
          "name": "text",
          "source": "/document/sections"
        }
      ],
      "outputs": [
        {
          "name": "languageCode",
          "targetName": "language"
        }
      ]
    }
  ],
  "cognitiveServices": {
    "@odata.type": "#Microsoft.Azure.Search.CognitiveServicesByKey",
    "description": "Cognitive Services for Language Detection",
    "key": null
  },
  "knowledgeStore": null,
  "indexProjections": null,
  "encryptionKey": null
}

The Index JSON definition is shown below.

{
  "@odata.context": "https://gt-dev-aisearch.search.windows.net/$metadata#indexers/$entity",
  "@odata.etag": "\"0x8DCD11D21662FA8\"",
  "name": "hr-data-json-indexer",
  "description": "JSON Indexer",
  "dataSourceName": "contoso-hr-data-json",
  "skillsetName": "hr-json-data-lang-detection",
  "targetIndexName": "hr-json-data-index",
  "disabled": null,
  "schedule": null,
  "parameters": null,
  "fieldMappings": [
    {"sourceFieldName": "/document/title", "targetFieldName": "title"},
    {"sourceFieldName": "/document/url", "targetFieldName": "url"},
    {"sourceFieldName": "/document/Geography", "targetFieldName": "Geography"},
    {"sourceFieldName": "/document/GlobalLinks", "targetFieldName": "GlobalLinks"},
    {"sourceFieldName": "/document/sections", "targetFieldName": "sections"},
    {"sourceFieldName": "/document/countryCode", "targetFieldName": "countryCode"},
    {"sourceFieldName": "/document/countryName", "targetFieldName": "countryName"},
    {"sourceFieldName": "/document/summary", "targetFieldName": "summary"},
    {"sourceFieldName": "/document/tagline", "targetFieldName": "tagline"},
    {"sourceFieldName": "/document/lastModifiedDate", "targetFieldName": "lastModifiedDate"},
    {"sourceFieldName": "/document/language", "targetFieldName": "language"}
  ]
}
   

So, what is wrong my skillet, why am I getting the error - 'Required skill input is missing or empty. Name: 'text'_ Source: '$(/document/sections)'.

Any help is much appreciated.

Azure AI Search
Azure AI Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
1,339 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.