I have been using the Azure cognitive search to create the search index where the data source will be the azure SQL database.
I have created the search index for azure cognitive search and for the key index will be the id column from the table and the datatype will be fixed as edm.string type.
I have seen that we can change the datatype of id column to edm.int32 using the field mapping.
Can anyone help me with how we can able to create the field mapping for id column by changing the datatype to edm.int32
Id column must be string. Here's the statement from the official doc:
Identify a document key. A document key is an index requirement. It's
a single string field and it will be populated from a source data
field that contains unique values. For example, if you're indexing
from Blob Storage, the metadata storage path is often used as the
document key because it uniquely identifies each blob in the
container.
https://learn.microsoft.com/en-us/azure/search/search-how-to-create-search-index?tabs=portal#schema-checklist
You can create a T-SQL view and cast your id from int to varchar over there.
Related
I have a combined index that crawls data from Azure SQL and Blob and are mapped based a common column.
The mapped blob document is optional.
When there is no blob document the search indexer indexes the respective SQL row setting the content propertyas null and if the document is available the content property shows correct data.
I have enabled BLOB deletion tracking and the issue comes when a blob document is deleted. The deletion policy triggers and also removes the mapped SQL row values from index.
I was expecting that the content property will be set to null, but the deletion policy also removes the mapped SQL row values from index.
What am I doing wrong? Kindly help.
Thanks a lot in advance..
BR
The behavior you are seeing is by default. SQL Deletion Policy deletes full index documents based on their document Key, not specific fields. The policy doesn't have a way to know the index has values from other sources too. If there is a combined index and you would like the behavior you are looking for, you may try instead using a Logic App SQL trigger to update only specific fields with Add, update or delete documents, instead of the Deletion Policy.
I would like to filter on unique / distinct Lastname while using the Get Entities from the Azure Storage Table. Distinct is currently not supported and groupby also doesn't seem to fit. How can I filter on unique Lastname using the OData Filter?
At a moment there is no option to query directly with unique or distinct keywords. You can refer to this Official Documention for more information.
You can give feedback HERE for a Feature request.
I am using Azure Data Factory (ADF) to load data from Dynamics 365 to an Azure Database. However, for some columns I get a GUID value like 8234CCBA-7B01-E211-B551-D48564518CCA instead of the actual value.
Is there a way to retrieve the real data either by using SQL or changing something in Dynamics?
Normally we will use web api formatted values or CRM SDK methods to get the display name field of related table (Foreign key) in C# or javascript. In ADF, I don't think you can fetch the formatted values for picklist (Integer key values) or lookup (GUID) attributes.
Instead you can use ADF data flow to fetch the different datasets and join them for these kind of data transformations. Read more
Otherwise, dump all the datasets you need into Azure DB - for transformations later in DB views.
I'm trying to use ADF to create azure table storage tables from one source SQL table.
Within my pipeline..
I can query a distinct list of customers pass this into a for-each
task.
Inside the for each select the data for each customer
But when I try to to create an Azure table for each customers data with the table name based on the customer ID I hit errors.
The customer ID is a GUID so I'm trying to format this to remove the dashes which are invalid in a table name...
Something along the lines of
#replace('#{item().orgid}','-','')
So 7fb6d90f-2cc0-40f5-b4d0-00c82b9935c4 becomes 7fb6d90f2cc040f5b4d000c82b9935c4
I can't seem to get the syntax right
Any ideas?
try this: #replace(item().orgid,'-','').
In azure table storage is it possible to add a unique constraint on a column of a given table?
Azure Table Storage entities don't have columns. Each entity may have properties and these properties don't need to be the same for each entity.
The only unique constraint is the combination of partition key + row key.
There's an excellent article on Azure table storage here:
http://msdn.microsoft.com/en-us/library/windowsazure/dd179338.aspx
Since it only has a Row Key and a Partition Key, and the Row Key is essentially the primary key, it doesn't look like there's any other constraint you can put on it unless you build that sort of thing into your client/server which uses or exposes it.
From the article:
The Table service does not enforce any schema for tables, so two entities in the same table may have different sets of properties. Developers may choose to enforce a schema on the client side. A table may contain any number of entities.
HTH :)