Configuring Data Source for Azure Synapse Serverless SQL Pool in Azure AI Search

Suyash Dwivedi 20 Reputation points Microsoft Employee
2024-11-26T14:33:49.4666667+00:00

Hi Team, I am trying to add a Synapse serverless SQL pool database as a data source for indexing in Azure AI Search, utilizing managed identity for authentication between services.

The following prerequisites have been completed:

  1. Azure AI Search's managed identity has the DB Reader role on the view in the Synapse serverless database.
  2. Azure AI Search's identity is assigned as a reader on the Synapse workspace.
  3. Networking options in the Synapse workspace permit connections from Azure services.

According to the SQL database data source setup documentation for managed identity, the resource ID must be formatted correctly to configure the data source and run the indexer:

{
  "@odata.context": "xxxx",
  "@odata.etag": "\"0xxxx\"",
  "name": "xxxx",
  "description": null,
  "type": "azuresql",
  "subtype": null,
  "credentials": {
    "connectionString": "Database=<dbname>;ResourceId=<resource id>;"
  },
  "container": {
    "name": "view name",
    "query": null
  },
  "dataChangeDetectionPolicy": null,
  "dataDeletionDetectionPolicy": null,
  "encryptionKey": null
}

The above JSON snippet is functional for adding SQL databases with the specified connection string format. However, I am facing challenges in configuring it for the serverless Synapse SQL database. I have tried various connection string format, including:

  • Database=<dbname>;ResourceId=<synapse workspace id>
  • Database=<dbname>;ResourceId=<synapse pool resource id>
  • Database=<dbname>;ResourceId=<synapse workspace id>/sqlpools/<serverless sql endpoint>
  • Server=<serverless sql endpoint>;Database=<testdb>;Authentication=<Auth option>;

When trying to create the indexer, a bad request response is received, lacking clarity on the issue for the first three connection strings, or an error indicating that login failed for the user in the last one. I could not find any specific docs on adding synapse db view. Any suggestions regarding the correct connection string format or links to relevant documentation would be appreciated.

I have tried using C# sdk and azure portal for setting up indexers both are giving same results.

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
Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,373 questions
{count} votes

Accepted answer
  1. VenkateshDodda-MSFT 24,951 Reputation points Microsoft Employee Moderator
    2024-11-27T04:38:02.2433333+00:00

    @Suyash Dwivedi Thanks for posting your question in Microsoft Q&A, apologize for any inconvenience caused on this.

    Based on the shared information, I understand that you are trying to create a DataSource & index using the built-in serverless sql pool which is getting failed with internal server error.

    If my understanding is correct, then this is an expected behavior.

    All the built-in SQL serverless pool that is created in synapse won't be shown under your subscription and that is reason you are not able to create a data source with Azure AI search service.

    Also, the scope of this serverless pool will be within the workspace only.

    We have observed that we can create the data source in AI search with dedicated SQL pool in synapse workspace.

    If you want to create a data source with Serverless SQL I would suggest you create an Azure SQL database in serverless mode and try connecting to search service from it.

    Refer to the similar thread here : https://learn.microsoft.com/en-us/answers/questions/2088971/unable-to-connect-with-azure-sql-database-through

    Hope this helps, let me know if you have any further questions on this.


0 additional answers

Sort by: Most helpful

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.