Hi James Hippolite,
The Azure AI Search indexer expects a valid Cosmos DB connection string, but in this case, the provided string is intentionally partial because the data is publicly accessible in read-only
mode. A Base64 decoding
error can occur if the tutorial isn't clear or the connection string
is copied incorrectly, such as with extra line breaks or wrong characters.
- Go back to the tutorial page and check that the connection string in the "Data source" step is correct.
- The correct sample connection string, which
doesn't require
an Account Key is
{
"type": "cosmosdb",
"credentials": {
"connectionString": "AccountEndpoint=https://azuresamples.documents.azure.com:443/;"
},
"container": {
"name": "Hotels"
}
}
Some tools, like Azure portal or Postman, may need a full connection string with a key, but Azure AI Search can access the sample Cosmos DB without a key
if public access is supported.
- When using the Azure Portal, code, or CLI, make sure you're using the correct
connection string
that includes only theendpoint
. The data source definition should not include anAccountKey
field. Also, ensure the Cosmos DB API is set toSQL API
, not MongoDB or Cassandra. - If the portal or tool requires a key, you can instead go to your Azure
Cognitive Search
service, clickImport Data
, selectSamples
, and choose theHotels
sample dataset.
Please refer to the documents below.
https://learn.microsoft.com/en-us/azure/search/search-get-started-portal#start-the-wizard
Please accept as "Yes" if the answer provided is useful, so that you can help others in the community looking for remediation for similar issues.
Let me know if you have any further Queries.