c# - Azure Search SDK Create DataSource -
i've been created datasource azure search sdk.
the datasource azure sql view.
i tyr setting datachangedetectionpolicy , datadeletiondetectionpolicy, can't understand how set 2 property.
when think 2 property doesn't supported on preview sdk,so try use rest api solve this.
i read article: msdn create data source (azure search service rest api)
and use chrome extension postman set data change detection policies.
url : https://domain.search.windows.net/datasources/temp1?api-version=2015-02-28
body :
{ "@odata.type" : "#microsoft.azure.search.highwatermarkchangedetectionpolicy", "highwatermarkcolumnname" : "modifieddatetime" }
then 400 bad request .
error message:
{ "error": { "code": "", "message": "the request invalid. details: datasource : incompatible type kinds found. type 'microsoft.azure.search.highwatermarkchangedetectionpolicy' found of kind 'complex' instead of expected kind 'entity'.\r\n" } }
so,i have 2 questions.
1.is sdk not support function now?
2.with rest api , how solve error?
thanks reply.
based on official article, way create datasource sql integration views is:
{ "name" : "myazuresqldatasource", "type" : "azuresql", "credentials" : { "connectionstring" : "connection string" }, "container" : { "name" : "table or view name" }, "datachangedetectionpolicy" : { "@odata.type" : "#microsoft.azure.search.highwatermarkchangedetectionpolicy", "highwatermarkcolumnname" : "[a row version or last_updated column name]" } }
Comments
Post a Comment