New: build custom CDF applications with Cognite Flows. Documentation · What's new.
from cognite.client.data_classes.hosted_extractors import EventHubSourceWrite
job_write = EventHubSourceWrite('my_event_hub', 'http://myeventhub.com', "My EventHub", 'my_key', 'my_value')
job = client.hosted_extractors.jobs.create(job_write){
"items": [
{
"externalId": "my.known.id",
"destinationId": "<string>",
"sourceId": "<string>",
"format": {
"type": "rockwell",
"encoding": "utf8",
"compression": "gzip",
"prefix": {
"fromTopic": true,
"prefix": "<string>"
},
"dataModels": {
"space": "<string>"
}
},
"targetStatus": "running",
"status": "startup_error",
"config": {
"topicFilter": "<string>"
},
"createdTime": 1730204346000,
"lastUpdatedTime": 1730204346000,
"name": "<string>",
"description": "<string>",
"metadata": {}
}
]
}Required capabilities:
hostedExtractors:READhostedExtractors:WRITE
Create up to 10 jobs.
from cognite.client.data_classes.hosted_extractors import EventHubSourceWrite
job_write = EventHubSourceWrite('my_event_hub', 'http://myeventhub.com', "My EventHub", 'my_key', 'my_value')
job = client.hosted_extractors.jobs.create(job_write){
"items": [
{
"externalId": "my.known.id",
"destinationId": "<string>",
"sourceId": "<string>",
"format": {
"type": "rockwell",
"encoding": "utf8",
"compression": "gzip",
"prefix": {
"fromTopic": true,
"prefix": "<string>"
},
"dataModels": {
"space": "<string>"
}
},
"targetStatus": "running",
"status": "startup_error",
"config": {
"topicFilter": "<string>"
},
"createdTime": 1730204346000,
"lastUpdatedTime": 1730204346000,
"name": "<string>",
"description": "<string>",
"metadata": {}
}
]
}Documentation Index
Fetch the complete documentation index at: https://docs.cognite.com/llms.txt
Use this file to discover all available pages before exploring further.
Access token issued by the CDF project's configured identity provider. Access token must be an OpenID Connect token, and the project must be configured to accept OpenID Connect tokens. Use a header key of 'Authorization' with a value of 'Bearer $accesstoken'. The token can be obtained through any flow supported by the identity provider.
Jobs to create.
1 - 10 elementsShow child attributes
Successful Response
Show child attributes
Was this page helpful?