rak_haq
New Contributor III

I found the solution und could successfully establish a connection to Event-Hub. 

 
SELECT
cast(value as STRING) as raw_json,
current_timestamp() as processing_time
FROM read_kafka(
  bootstrapServers => '<YOUR EVENT-HUB NAMESPACE>.servicebus.windows.net:9093',
  subscribe => '<YOUR TOPIC>',
  `kafka.sasl.mechanism` => 'PLAIN',
  `kafka.security.protocol` => 'SASL_SSL',
  `kafka.sasl.jaas.config` => concat(
    'kafkashaded.org.apache.kafka.common.security.scram.ScramLoginModule required ', 
    'username="$ConnectionString" ', 'password="', secret('<SCOPE>','<KEY>'), '";' -- Get your Credentials from Key Vault
)
)
Limit 10

View solution in original post