I'm sending batch data to the event hub from web jobs written in node js and I can be able to receive the data at Azure stream analytics. But I cannot be able to see the partition key at ASA. I'm using the following code to send the data to the event hub.
const {EventHubClient} = require("@azure/event-hubs");
var axios = require('axios');
const connectionString = "Endpoint=connectionstring";
const eventHubsName = "eventhubname";
async function main(){
const client = EventHubClient.createFromConnectionString(connectionString,eventHubsName);
var axios = require('axios');
var response = await axios.get('https://nseindia.com/live_market/dynaContent/live_watch/stock_watch/nifty500StockWatch.json');
var response1 = await axios.get('https://www.nseindia.com/live_market/dynaContent/live_analysis/gainers/niftyGainers1.json');
var eventData = [{body:response1['data']['data'],partitionKey:"pk12346"},{body:response['data']['data'],partitionKey:"pk12345"}];
console.log(eventData);
console.log("begin send...");
await client.sendBatch(eventData);
await client.close();
}
main().catch(err =>{
console.log("Error occurred: ",err);
});
data inside response1['data']['data'] and response1['data']['data'] is an array of object data. for example [{key1:value1,key2:valu2},{{key1:value1,key2:valu2}}]
If I'm not able to see the partition at ASA(while getting the sample data from input) how can use where condition for a partitionkey and apply trnsformation.