Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI for business
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Yandex IoT Core
    • All guides
    • Sending messages
    • Subscribing a device or registry to receive messages
    • Exporting messages to Data Streams
    • Viewing the connection log
    • Viewing operations with service resources
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Public materials
  • Release notes
  • FAQ
  1. Step-by-step guides
  2. Exporting messages to Data Streams

Exporting messages to Data Streams

Written by
Yandex Cloud
Improved by
Max Z.
Updated at October 14, 2025

Note

You can export data to Data Streams only from the */events and */commands topics.

Management console
CLI
API
  1. In the management console, select the folder where the registry is located.

  2. Select IoT Core.

  3. Select the required registry from the list.

  4. Navigate to the Export to Data Streams tab.

  5. In the top-right corner, click Add export.

  6. Fill out the fields as follows:

    • Name: Export name.
    • MQTT topic filter: Specify the topic from which you want to export messages or a filter using wildcard characters. If you leave this field empty, messages will be exported from all topics within the registry, including topics from all devices within the registry.
    • Data stream: Specify the name of the data stream where you want to send messages from MQTT topics, or create a new one. If you chose to create a new stream, click Update to update the list of streams.
    • Service account: Specify a service account with the yds.writer role.
  7. Click Add.

If you do not have the Yandex Cloud CLI installed yet, install and initialize it.

By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.

To create an export:

  1. Get a list of registries in the folder:

    yc iot registry list
    

    Result:

    +----------------------+-------------------+
    |          ID          |       NAME        |
    +----------------------+-------------------+
    | arenou2oj4********** | my-registry       |
    +----------------------+-------------------+
    
  2. Create an export:

    yc iot registry yds-export add \
      --registry-name <registry_name> \
      --name <export_name> \
      --database <DB_path> \
      --stream <stream_name> \
      --mqtt-topic-filter <topic> \
      --stream-service-account-name <service_account_name>
    

    Where:

    • --registry-name: Registry name.
    • --name: Export name.
    • --database: Location of the database storing the stream data, the second part of the Endpoint field value (following /?database=), e.g., /ru-central1/r1gra875baom********/g5n22e7ejf**********.
    • --stream: Name of the data stream to receive messages from MQTT topics.
    • --mqtt-topic-filter: Topic to export messages from or filter using wildcard characters. If this parameter is not specified, messages will be exported from all topics within the registry, including topics from all devices within the registry.
    • --stream-service-account-name: Name of the service account with the yds.writer role.

    Result:

    id: are520n46t**********
    name: export-from-topic
    registry_id: areqqa5ntm**********
    database: /ru-central1/b1gia87mbaom********/etnu4r0v1c**********
    stream: topic-message-stream
    service_account_id: ajeu9klp40**********
    created_at: "2023-09-18T09:52:28.840124837Z"
    

To add the export to Data Streams for a registry, use the RegistryService/AddDataStreamExport gRPC API call.

See alsoSee also

  • Exporting to Data Streams

Was the article helpful?

Previous
Subscribing a device or registry to receive messages
Next
Viewing the connection log
© 2025 Direct Cursus Technology L.L.C.