December 2, 2025·Real Time

Mastering Data Export in Eventhouse: From Eventstream to OneLake and SQL

eventhouseonelakeexportkustokqlfabricreal-time-intelligence

With all of the Ignite announcements, there has been a lot to keep up with: SQL 2025 going GA brings Change Event Streams to everything SQL; Activator released capabilities to call Fabric functions; Eventstream now has HTTP and MongoDB CDC feeds; Operations Agents allow you to create autonomous agents that monitor your business 24x7; the Eventhouse endpoint brings event-driven architecture capabilities to Lakehouse and Warehouse; and Ontologies allow you to create and define the important business concepts in your organization for AI systems, bringing shared understanding across engines.

The Pattern: Operationalizing Curated Eventhouse Data

Over the past few weeks, I've worked with two different customers who shared a common challenge: how to operationalize curated Eventhouse data for analytics, reporting, and cross-team sharing without giving broad access to the source Eventhouse.

Although their use cases were different, the architectural pattern ended up being the same.

Customer 1 needed to export select Eventhouse tables to AWS S3, where ClickHouse powered legacy operational reports. Customer 2 needed to expose a curated Eventhouse table to a different department but struggled with Lakehouse sharing and Fabric security — they needed table-level export, not workspace-level permissioning.

These scenarios highlight a broader truth: operational analytics frequently require pushing Eventhouse data downstream into other engines — OneLake, ADLS, SQL, or external systems — to enable integration without duplicating processing or broadening security boundaries.

Why Export from Eventhouse?

Eventhouse gives teams a unified, high-performance environment for real-time data shaping. But operational systems often need that data outside Eventhouse for BI workloads embedded in other platforms, department-level views without granting access to the source Eventhouse, external systems that rely on flat files (CSV, JSON, Parquet), cloud databases requiring curated fact tables, cross-cloud integrations with S3 or service-specific processors, and supporting legacy systems while transitioning to Fabric.

Exporting becomes the bridge.

For this walkthrough, we'll work from a table populated from Eventstream's Bicycle sample data, containing bike station locations, usage, and operational metrics.

Export Command Overview

The .export command moves Eventhouse data to storage in multiple formats: CSV, TSV, JSON, and Parquet.

Step 1: Handling Sensitive Values — Obfuscated String Literals

When exporting to storage that uses access keys or connection strings, never expose keys in logs.

Kusto supports obfuscated string literals: prefix a string with h to ensure the value is masked in telemetry:

h'MySuperSecretString'
H"MySuperSecretString"
"ThisIsMy"h'SuperSecretString'

You can put it at the beginning to secure the entire string or only portions of it.

Step 2: Export to OneLake and ADLS

When exporting to OneLake, use the below structure. You can grab both GUIDs directly from your Lakehouse URL in Fabric. The folder should already exist in your Lakehouse.

https://onelake.dfs.fabric.microsoft.com/<workspaceGUID>/<lakehouseGUID>/Files/<folder>/

For OneLake, note that you can only use Impersonate as the authentication method. For ADLS you can use any of the options listed in the docs.

// Export to OneLake or ADLS
.export to csv
(h@"https://onelake.dfs.fabric.microsoft.com/<workspaceGUID>/<LakehouseGuid>/Files/EventhouseExtracts/;impersonate") // OneLake
// ("https://<MyStorageAccount>.blob.core.windows.net/containername/"h';impersonate') // ADLS
with (
   sizeLimit=10000,
   namePrefix="export",
   includeHeaders="all",
   encoding="UTF8NoBOM"
)
<|
// Your query here — export the whole table, rows since the last export, or only rows from the last time period
bicyclesampleraw
| take 100

Step 3: Export Data to SQL

To export data to a SQL database, use .export with the to sql option. This works on any cloud version of SQL.

// Export to SQL
.export to sql ['dbo.EventhouseExtracts']
   h@"Server=tcp:MyServer.database.windows.net, 1433;Authentication=Active Directory Integrated;Initial Catalog=MyDatabaseName;Connection Timeout=30;"
with (
   createifnotexists="true"
)
<|
bicyclesampleraw
| project tostring(BikepointID), tostring(Street), tostring(Neighbourhood),
          tostring(Latitude), tostring(Longitude), toint(No_Bikes), toint(No_Empty_Docks)
| take 100

Important: In SQL, the project clause matters. SQL requires strict type mapping.

Operationalizing Export Commands

Once you have your .export command defined, you can operationalize it through Notebooks (parameterized operational flows) or Activator (scheduled data pushes).

This enables cross-team table sharing without granting Eventhouse access, exporting curated views into Lakehouse for governed analytics, feeding external analytical systems during transition periods, and continuing support for legacy operational workloads post-go-live.