Indexer definition of configuration delimitedTextHeaders to load TSV with fieldMappings where the TSV has spaces in header

BlazorDevCanada 46 Reputation points
2022-12-20T13:30:50.42+00:00

I have TSV files in blob containers that have column headers with spaces in the column header string; e.g. Column One, Column Two, Column Three.

In the Indexer Definition (JSON) tab I put the following

"parameters": {  
	"batchSize": null,  
	"maxFailedItems": null,  
	"maxFailedItemsPerBatch": null,  
	"base64EncodeKeys": null,  
	"configuration": {  
		"parsingMode": "delimitedText",  
		"delimitedTextHeaders": "Column One, Column Two, Column Three"  
	}  
},  
"fieldMappings": [  
	{  
		"sourceFieldName": "Column One",  
		"targetFieldName": "id",  
		"mappingFunction": null  
	},  
	{  
		"sourceFieldName": "Column Two",  
		"targetFieldName": "field1",  
		"mappingFunction": null  
	}  
]  

But it did not work. I got an error

Data source does not contain column 'Column One', which is required because it maps to the document key field 'id' in the index <MyIndexName>. Ensure that the 'Column One' column is present in the data source, or add a field mapping that maps one of the existing column names to 'id'.

Obviously I am not doing it correctly. What is the correct Indexer definition for TSV with spaces in headers?

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,158 questions
{count} votes

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.