azure


Set the output of Azure stream analytics to be Event Hub


I am trying to use the event hub as the output sink for the Azure stream analytics and the code to do it is shown below.
OutputCreateOrUpdateParameters jobOutputCreateParameters = new OutputCreateOrUpdateParameters()
{
Output = new Output()
{
Name = streamAnalyticsOutputName,
Properties = new OutputProperties()
{
Serialization = new JsonSerialization
{
Properties = new JsonSerializationProperties
{
Encoding = "UTF8"
}
},
DataSource = new EventHubOutputDataSource
{
Properties = new EventHubOutputDataSourceProperties
{
ServiceBusNamespace = "UKFC2-ns",
SharedAccessPolicyName = "manage",
SharedAccessPolicyKey = "aWFOgfkXPCYz5fdLMIIPXGEkT0EszW+g/OEOI3jhx5U=",
EventHubName = "ukfc1",
PartitionKey = partition
}
}
}
What I want to do is to send the result of the stream analytics to a specific partition in the event hub. I did it by setting the PartitionKey property to a string I defined. However, that doesn't work. It seems that the partitionKey property in the EventHubOutputDataSourceProperties is not the partition key used in the event hub. Then my question is how can I send the to a specific partition and set the partition key to what I want.
Any help is appreciated.
The PartitionKey property is expecting a column from your query output. To solve this, add a column in your query that represents the partition you want. If your input doesn't have the EH partition you want, you could hard code it into the query:
SELECT '1' AS EHPartition, Column1, ... into output from input
Then set the PartitionKey property to "EHPartition".

Related Links

Creating an Azure Search document schema which enables scoring by filters
Understanding resource and authority url
Azure: Parameter 'requestid' value is invalid
Azure App Service scale instances only when warmed up
Handling several Azure Functions with same named DLL
How to get Azure Sql server port number in ARM?
Azure Service fabric ,access Application via domain name
Web role stops immediately in azure emulator
Setting Azure Redis SessionState provider for sub webconfig
java.lang.ClassNotFoundException: org.apache.hadoop.fs.BlockStoragePolicySpi
Is it secure to pass the DB query to AzureML as a global parameter?
How do I install software as a startup task in Service Fabric?
.Net Core - Azure Application Insights not showing exceptions
How to configure SSL on MS Azure in Virtual Machines (classic) setup
Networkservice.NSPluginConnectionFailedexception: the remote server returned an error 409 conflict
Azure: How to ssh to a vm in a resource group with several ubuntu vms

Categories

HOME
apache-spark
asp.net-identity
f#
groovy
bootstrap-4
office-js
compliance
blogs
outlook
anylogic
weight
xamarin.forms-listview
normalization
gluon
format
jasypt
base
android-vision
wso2-das
asciidoc
avplayer
cytoscape.js
jquery-jtable
google-cloud-sdk
cloudrail
fbx
swig
appcelerator-alloy
stm32f4discovery
man
aspdotnetstorefront
nice-language
pvs-studio
scalability
iar
graphql-dotnet
temp
coqide
python-responses
spring-websocket
blockui
advanced-installer
azure-app-service-envrmnt
mask
ecmascript-4
vtable
worldpay
procobol
logicblox
project-centennial
hydra
kendo-chart
log4perl
zuul
pseudo-element
arm7
uifont
canopen
tryton
waf
blocking
rails-console
hapi.js
setwindowshookex
ckcontainer
balsamiq
nuitka
dms
asp.net-webpages
ctakes
lidar
training-data
balana
oracle-bi
autopy
uikeyboard
json4s
android-gpuimageview
wss4j
react-rails
abort
vraptor
java-client
bessel-functions
short
wmv
css3pie
ducttape
couchrest
broadcom
floating-point-conversion
adlds
uptime
virtual-earth
blackberry-cascades
ad-hoc-distribution
nextpeer
jsr223
undeclared-identifier
expression-encoder-sdk
datatemplate
textboxlist
ssao
.net-1.1
nstreecontroller
android-3.1
wiki-markup
alivepdf
jboss-cache
chickenfoot
newsgroup
server.transfer
development-machine

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App