I am currently working on importing a json file from an Azure blob container using Azure Data Factory.
Despite closely following the documentation and researching various resources on Stack Overflow, I am facing challenges with making the ajax request function properly.
After overcoming CORS issues to access the json file, I now encounter a Data Loading Error:
Data Loading Error - Unable to process data due to invalid data type
Expecting: array
Received: undefined
Data: undefined
In my initial assumption, I suspected that the BOM added at the beginning of the json file before the array could be causing the issue. This suspicion arose when I noticed the BOM preceding the array in the file preview in Chrome.
Nevertheless, I have manually removed the BOM and re-uploaded the file to the blob storage, yet the error persists.
Below is my Tabulator code integrated into an HTML file for loading:
var table = new Tabulator("#example-table", {
ajaxConfig:{
method: 'GET',
mode: 'cors'
},
ajaxURL:"https://mihndbotblob.blob.core.windows.net/mihndbot-transcripts/finalTranscripts/2019-08-07.json",
index:"MessageID",
autoResize:true,
layout:"fitData",
placeholder:"Awaiting Data...",
columns:[
{title:"Type", field:"Type", visible:false},
...
],
ajaxResponse:function(url, params, response){
return response.data;
},
rowClick:function(e, row){
alert("Row " + row.getData().id + " Clicked!!!!");
},
});
The json data loads perfectly fine when done manually as shown below:
var tableData = [
// JSON data here
];
The structure of the json file returned by the ajax call mirrors the one above, confirmed through the Chrome preview.
https://i.sstatic.net/6Agfy.png
I hit a roadblock in resolving the ongoing issue and would appreciate any insights or solutions to overcome it.