1
votes

When importing data using the configuration found below, Azure Cognitive Search returns the following error:

Error detecting index schema from data source: ""

Is this configured incorrectly? The files are stored in the container "example1" and in the blob folder "json". When creating the same index with the same data in the past there were no errors, so I am not sure why it is different now.

Import data:

Data Source: Azure Blob Storage
Name: test-example
Data to extract: Content and metadata
Parsing mode: JSON
Connection string:
DefaultEndpointsProtocol=https;AccountName=EXAMPLESTORAGEACCOUNT;AccountKey=EXAMPLEACCOUNTKEY;
Container name: example1
Blob folder: json

.json file structure.

{
  "string1": "vaule1",
  "string2": "vaule2",
  "string3": "vaule3",
  "string4": "vaule4",
  "string5": "vaule5",
  "string6": "vaule6",
  "string7": "vaule7",
  "string8": "vaule8",
  "list1": [
    {
      "nested1": "value1",
      "nested2": "value2",
      "nested3": "value3",
      "nested4": "value4"
    }
  ],
  "FileLocation": null
}

Here is an image of the screen with the error when clicking "Next: Add cognitive skills (Optional)" button: enter image description here

3
It looks like something may be wrong with the connection string. It looks suspicious that the data source name in the error message would be empty. - Bertrand Le Roy
I used the "Choose an existing connection" wizard to choose the storage account and container name. See the blue link in provided image under the "Connection string" field. - crayden
I just went through the exact same steps, using the same JSON you have there, and it went through without a problem, so the JSON is not the issue. The issue is probably something to do with the connectivity between your search service and your storage service. My connection string is "DefaultEndpointsProtocol=https;AccountName=REDACTED;AccountKey=REDACTED==;EndpointSuffix=REDACTED.windows.net". You may also want to check resource group, access control, etc. If there's a setting you'd like to compare with mine, let me know. - Bertrand Le Roy

3 Answers

1
votes

To clarify there are two problems:

1) There is a bug in the portal where the actual error message is not showing up for errors, hence we are observing the unhelpful empty string "" as an error message. A fix is on the way and should be rolled out early next week.

2) There is an error when the portal attempts to detect index schema from your data source. It's hard to say what the problem is when the error message is just "". I've tried your sample data and it works fine with importing.

I'll update the post once the fix for displaying the error message is out. In the meantime (again we're flying blind here without the specific error string) here are a few things to check:

1) Make sure your firewall rules allow the portal to read from your blob storage

2) Make sure there are no extra characters inside your JSON files. Check the whitespace charcters are whitespace (you should be able to open the file in VSCode and check).

Update: The portal fix for the missing error messages has been deployed. You should be able to see a more specific error message should an error occur during import.

0
votes

Seems to me that is a problem related to the list1 data type. Make sure you're selecting: "Collection(Edm.String)" for it during the index creation.

more info, please check step 5 of the following link: https://docs.microsoft.com/en-us/azure/search/search-howto-index-json-blobs

0
votes

I have been in contact with Microsoft, and this is a bug in the Azure Portal. The issue is the connection string wizard does not append the Endpoint suffix correctly. They have recommeded to manually pasting the connection string, but this still does not work for me. So this is a suggested answer by Microsoft, but I don't believe is completely correct because the portal outputs the same error message:

Error detecting index schema from data source: ""