I am new to Azure Cognitive Search and was able to get Azure Search work with SQL Server but I want to use Azure Search for PostgreSQL. I could not find it in the documents that Azure Search supports PostgreSQL. Can someone confirm that for me?
I created an Instance of Azure Cognitive Search and click on Import Data and on Connect Data for the data source, I only see Cosmos, Azure SQL, SQL Server on VMs, Table Storage and there is no Postgres.
If I am missing something, can you please provide an official documentation or an example of how can I use PostgreSQL with Azure Search?
2
Answers
Using Import Data, Postgres is not a supported data source and you can confirm in the official doc:
https://learn.microsoft.com/en-us/rest/api/searchservice/create-data-source#request-body
However, you can program the data extraction and push data to your index. In fact, I often prefer this way.
If you don’t have the index created, you can do it using the following REST api definition:
https://learn.microsoft.com/en-us/rest/api/searchservice/create-index
Then, you add data using the following REST api:
https://learn.microsoft.com/en-us/rest/api/searchservice/addupdate-or-delete-documents
You can use an Azure Data Factory pipeline that supports PostgreSQL as source and use a staged storage account, then you can create a Blob indexer or use an Azure Cognitive Search index sink.
In this temporary documentation link you can find how to set the Azure Data Factory pipeline for this integration.