Delivery model
Audit logs are written as a Delta Lake table in storage you own. Your stream is scoped to your organization or to specific projects within it. Cognite creates the table when the stream is first set up and appends new events in batches. Cognite does not modify existing events.- Partitioning — The table is partitioned by
orgName,year, andmonth. Most streams contain a single CDF organization. If your stream covers multiple organizations, filter withorgName = 'your-org'inWHEREclauses so the query engine applies partition pruning and scans less data. - Write cadence — Batches flush when a buffer reaches its size threshold or when a maximum time since the last successful write is reached, whichever comes first. The maximum interval is 60 minutes.
- Durability — Each flush is a Delta commit. Failed or incomplete writes do not appear in your bucket.
- Table properties — Cognite sets properties such as target file size and deleted file retention when the table is created. Verify the table configuration before running maintenance.
OPTIMIZE and VACUUM. See Delta maintenance for recommended commands and schedule.
Query examples
The Delta Lake table can be queried with any compatible tool. Common options include:- Amazon Athena — for AWS-hosted storage
- Azure Synapse Analytics — for Azure-hosted storage
- Google BigQuery — for GCP-hosted storage
- Apache Spark — for any storage, shown in the examples below
Find all actions by a specific principal
Find all events in a time window
Filter using theyear and month partition columns to apply partition pruning.
Find failed requests
Count failures per principal
Find authentication events
Find group changes
MonitorIAM events that create or delete groups.
Summarize activity by service
Delta maintenance
Delta Lake maintenance requires two operations: storage optimization and data retention.Recommended schedule
Tune the schedule to your data volume and internal policies. A low-traffic organization may be fine with bi-weekly maintenance; a high-volume organization may need daily
OPTIMIZE on recent partitions only.
Order of operations
Always run maintenance in this order:OPTIMIZE— merge small Parquet files created by frequent appends.VACUUM— remove files that are no longer referenced by the Delta log.
Delta Lake supports automated optimization through optimized write and auto-compaction. Cognite recommends scheduled offline optimization instead, tuned to your data volume and needs.
Data retention
Delta differentiates between logical and physical retention. Data must be deleted logically before Delta removes the underlying files. This lets you recover data before files are permanently erased. See the Delta Lake data retention documentation for details. Logical deletion uses aDELETE query:
VACUUM:
Default table configuration
Cognite sets the following Delta properties when creating the table. Verify or reapply them before runningOPTIMIZE or VACUUM if your maintenance depends on custom values.
To adjust a property:
Data integrity
Cognite’s compatibility guarantees apply at the Delta Lake table level. Use a Delta-compatible reader (such as DuckDB, Apache Spark, or Microsoft Fabric) and do not depend on the structure, naming, or location of individual.parquet files.
Do not modify the Delta log
The Delta log in the_delta_log directory contains the metadata required to read the table.
- Partial deletion — Removing individual log files makes the table state inconsistent. Queries may fail or return incorrect results.
- Total deletion — If the entire directory is deleted, the storage path is no longer recognized as a Delta table. Cognite generates a new log as it continues to append data, starting at version 0. Data written before the deletion remains on disk but is invisible to the new table.
- Manual edits — Modifying the log corrupts table history and makes
VACUUMunsafe because the system can no longer determine which files are active.
Do not modify Parquet files manually
Parquet files in the table directory are managed by the Delta transaction log.- Manual deletion — The log still references deleted files, causing queries to fail with
FileNotFoundException. - Manual addition — Files added outside the transaction log are invisible to Delta Lake.
- Manual moves or renames — Disrupt the mapping between the log and physical files and can cause
OPTIMIZEorVACUUMto fail.
DELETE followed by VACUUM.
Storage tiering
Delta Lake requires frequent access to both the transaction log and data files. Manage storage tiers as follows: Delta log — hot storage only The_delta_log directory is read every time the table is opened or queried. Keep it on your provider’s most performant storage tier.
Data files — cold storage optional
Parquet data files can use lower-cost, infrequent-access tiers if you query older data less often.
Archive tiers — not supported
Archive-class tiers (for example, Azure Archive or AWS S3 Glacier) take data offline and require rehydration before reads. Delta Lake expects all referenced files to be immediately available. Moving any part of an active Delta table to an archive tier causes query failures.
Further reading
- About CDF audit logs — Schema and field definitions
- Audit log event types reference — All
serviceNameandeventTypevalues - Setting up audit log streaming — Configure delivery to your cloud storage