Skip to main content

File Servers Schema Reference

Access Analyzer stores File Server scan data in the access_analyzer ClickHouse database. The tables below are created when you set up a File Server source group and run a scan. Use this reference when querying scan data directly or integrating Access Analyzer data with external tools.

note

All tables use the ReplacingMergeTree engine. Duplicate rows with the same primary key are deduplicated at merge time. Query the _latest views to return only the most recent version of each record.

Metadata columns

All tables include the following columns populated by Access Analyzer during each scan:

ColumnTypeDescription
scan_idStringIdentifier of the source group that produced this record.
scan_execution_idStringIdentifier of the specific scan run.
scanned_atDateTimeTimestamp when the record was written.

Tables

CIFS Object

Stores the file system inventory collected during a scan — one row per file, directory, or share discovered on a file server.

ColumnTypeDescription
hostStringHostname of the file server.
share_nameStringName of the share on the file server.
share_pathStringUniversal Naming Convention (UNC) path of the share root.
pathStringFull path of the object within the share.
object_typeEnum8('FILE', 'DIRECTORY', 'SHARE')Whether the object is a file, directory, or share.
parent_pathStringFull path of the parent directory.
nameStringName of the file or directory.
file_extensionStringFile extension, if applicable. Empty string for directories and shares.
file_sizeUInt64Size of the file in bytes. Zero for directories and shares.
owner_sidStringSecurity identifier (SID) of the file or directory owner.
group_owner_sidStringSID of the primary group owner.
created_timeNullable(DateTime)Optional. Timestamp when the object was created.
modified_timeNullable(DateTime)Optional. Timestamp when the object was last modified.
accessed_timeNullable(DateTime)Optional. Timestamp when the object was last accessed.
scan_statusEnum8('SUCCESS', 'ERROR')Whether the object was scanned successfully.
error_messageStringError detail if scan_status is ERROR. Empty string on success.
attributesArray(Enum8('DIRECTORY', 'READONLY', 'HIDDEN', 'SYSTEM', 'ARCHIVE', 'COMPRESSED', 'ENCRYPTED'))Windows file attributes applied to the object.
inheritance_flagsUInt16Bitmask representing ACL inheritance settings on the object.
is_protectedNullable(Bool)Optional. Whether the object's ACL is protected from inheritance.
is_world_readableNullable(Bool)Optional. Whether any well-known open SID (for example, Everyone) has read access.
is_world_writableNullable(Bool)Optional. Whether any well-known open SID has write access.
is_admin_onlyNullable(Bool)Optional. Whether access is restricted to administrative accounts only.
has_explicit_denyNullable(Bool)Optional. Whether the object has at least one explicit deny ACE.
permission_countUInt16Total number of ACEs on the object.
unique_trustees_countUInt16Number of distinct trustees with permissions on the object.
permission_flagsUInt16Bitmask summarizing the permission state of the object.
is_completeBoolWhether the scan fully enumerated this object's permissions before the scan completed.
hard_deleteBoolInternal flag used by ReplacingMergeTree to exclude deleted rows. Rows where hard_delete = 1 are suppressed at query time when querying with FINAL.

Relations

Related tableJoin columnDescription
cifs_permissionhost, share_name, pathResolves NTFS permissions assigned to this file or directory.
cifs_sensitive_datahost, share_name, pathResolves sensitive data findings for this file.

CIFS Permission

Stores NTFS ACEs (access control entries) for files and directories — one row per trustee per path.

ColumnTypeDescription
trustee_sidStringSID of the user or group that this ACE grants or denies access to.
hostStringHostname of the file server.
share_nameStringName of the share containing the object.
pathStringFull path of the object this ACE applies to.
permissionsArray(Enum8('FILE_READ_DATA', 'FILE_WRITE_DATA', 'FILE_APPEND_DATA', 'FILE_READ_EA', 'FILE_WRITE_EA', 'FILE_EXECUTE', 'FILE_DELETE_CHILD', 'FILE_READ_ATTRIBUTES', 'FILE_WRITE_ATTRIBUTES', 'DIR_LIST', 'DIR_ADD_FILE', 'DIR_ADD_SUB_DIR', 'DIR_DELETE_CHILD', 'DELETE', 'READ_CONTROL', 'WRITE_DAC', 'WRITE_OWNER', 'GENERIC_ALL', 'GENERIC_EXECUTE', 'GENERIC_WRITE', 'GENERIC_READ'))Individual permission flags included in this ACE.
normalized_permissionsFixedString(6)Six-character string encoding the effective permissions (for example, RWXDMC) for use in summary queries.
access_typeEnum8('ALLOW', 'DENY')Whether this ACE allows or denies access.
access_maskUInt32Raw Windows access mask bitmask for this ACE.
inheritance_flagsUInt16Bitmask describing how this ACE propagates to child objects.
is_inheritedBoolWhether this ACE was inherited from a parent object rather than set explicitly.
mip_label_idNullable(String)Optional. Microsoft GUID of the MIP sensitivity label applied to this object.
mip_label_nameNullable(String)Optional. Display name of the MIP sensitivity label applied to this object.
hard_deleteBoolInternal flag used by ReplacingMergeTree to exclude deleted rows.

Relations

Related tableJoin columnDescription
cifs_objecthost, share_name, pathResolves file system object details for this ACE.
cifs_share_permissionhost, share_nameResolves the share-level permissions that apply in combination with this NTFS ACE.

CIFS Share Permission

Stores share-level ACEs — one row per trustee per share. Share permissions apply in addition to NTFS permissions; the effective access a user has is the intersection of both.

ColumnTypeDescription
trustee_sidStringSID of the user or group that this share ACE grants or denies access to.
hostStringHostname of the file server.
share_nameStringName of the share this ACE applies to.
permissionsArray(Enum8('FILE_READ_DATA', 'FILE_WRITE_DATA', 'FILE_APPEND_DATA', 'FILE_READ_EA', 'FILE_WRITE_EA', 'FILE_EXECUTE', 'FILE_DELETE_CHILD', 'FILE_READ_ATTRIBUTES', 'FILE_WRITE_ATTRIBUTES', 'DIR_LIST', 'DIR_ADD_FILE', 'DIR_ADD_SUB_DIR', 'DIR_DELETE_CHILD', 'DELETE', 'READ_CONTROL', 'WRITE_DAC', 'WRITE_OWNER', 'GENERIC_ALL', 'GENERIC_EXECUTE', 'GENERIC_WRITE', 'GENERIC_READ'))Individual permission flags included in this share ACE.
normalized_permissionsFixedString(6)Six-character string encoding the effective permissions for use in summary queries.
access_typeEnum8('ALLOW', 'DENY')Whether this ACE allows or denies access at the share level.
access_maskUInt32Raw Windows access mask bitmask for this share ACE.
mip_label_idNullable(String)Optional. Microsoft GUID of the MIP sensitivity label applied to this share.
mip_label_nameNullable(String)Optional. Display name of the MIP sensitivity label applied to this share.
hard_deleteBoolInternal flag used by ReplacingMergeTree to exclude deleted rows.

Relations

Related tableJoin columnDescription
cifs_permissionhost, share_nameResolves NTFS ACEs that apply within this share.

CIFS Sensitive Data

Stores sensitive data classification findings — one row per taxonomy term match per file path.

ColumnTypeDescription
hostStringHostname of the file server.
share_nameStringName of the share containing the file.
pathStringFull path of the file where sensitive data was detected.
taxonomy_nameStringName of the taxonomy that contains the matched term (for example, PII).
term_nameStringName of the classification term that matched (for example, Social Security Number).
processing_time_secondsFloat32Time in seconds to classify the file.
classification_methodNullable(Enum8('SDK_AUTO', 'SDK_CUSTOM'))Optional. Whether detection used the built-in automatic classification engine (SDK_AUTO) or a custom classification configuration (SDK_CUSTOM).
scan_statusEnum8('SUCCESS', 'ERROR')Whether the file was processed successfully. SUCCESS indicates the file was read and classified, regardless of whether sensitive data was found. ERROR indicates a processing failure such as a file conversion error, encryption, or unsupported format.
error_messageNullable(String)Optional. Error detail when scan_status is ERROR. Null on success.
hard_deleteBoolInternal flag used by ReplacingMergeTree to exclude deleted rows.

Relations

Related tableJoin columnDescription
cifs_objecthost, share_name, pathResolves file system object details for this finding.
cifs_sensitive_data_mip_labelshost, share_name, pathResolves MIP sensitivity label decisions applied to this file.

CIFS Sensitive Data MIP Labels

Stores Microsoft Information Protection (MIP) sensitivity label decisions for files that contain sensitive data findings. Each row records the label action Access Analyzer determined for a file based on its classification results. MIP labels are sourced from an Entra ID source group configured in the same Access Analyzer instance — Access Analyzer uses that source group to resolve label definitions and apply or recommend label changes.

note

This table uses ReplacingMergeTree(decision_timestamp) rather than scanned_at. The most recent decision per file (identified by source_id, host, share_name, and path) is kept at merge time.

ColumnTypeDescription
source_idUUIDIdentifier of the Entra ID source group used to resolve MIP label definitions.
hostStringHostname of the file server.
share_nameStringName of the share containing the file.
pathStringFull path of the file this label decision applies to.
mip_is_protectedBoolWhether the file is currently protected by MIP encryption.
taxonomy_idNullable(UUID)Optional. Identifier of the taxonomy that triggered this label decision.
actionEnum8('upgrade', 'keep', 'downgrade', 'clear', 'none')The label action Access Analyzer determined: upgrade applies a higher-sensitivity label, downgrade applies a lower-sensitivity label, keep leaves the current label unchanged, clear removes the label, and none indicates no action was taken.
label_idNullable(UUID)Optional. UUID of the MIP sensitivity label selected by the action.
label_nameNullable(String)Optional. Display name of the MIP sensitivity label selected by the action.
reasonNullable(String)Optional. Explanation of why this label action was chosen.
decision_timestampDateTimeTimestamp when Access Analyzer made this label decision.
scanned_atDateTimeTimestamp when the record was written.
applied_atNullable(DateTime)Optional. Timestamp when the label was successfully applied to the file. Null if not yet applied.
apply_errorStringError message if the label application failed. Empty string when no error occurred.
apply_attemptsUInt8Number of times Access Analyzer has attempted to apply this label decision.
created_atDateTimeTimestamp when this record was first created.
updated_atDateTimeTimestamp when this record was last updated.

Relations

Related tableJoin columnDescription
cifs_sensitive_datahost, share_name, pathResolves the sensitive data findings that triggered this label decision.

Views

Access Analyzer creates views that simplify common queries. Use views in preference to querying base tables directly.

ViewBase tableDescription
cifs_object_latestcifs_objectReturns the most recent version of each file system object, using FINAL to suppress duplicates.
cifs_permission_latestcifs_permissionReturns the most recent version of each NTFS ACE, using FINAL to suppress duplicates.
cifs_share_permission_latestcifs_share_permissionReturns the most recent version of each share-level ACE, using FINAL to suppress duplicates.
cifs_sensitive_data_latestcifs_sensitive_dataReturns one aggregated row per file path, combining all taxonomy and term matches for that path. The taxonomy_names and term_names columns return arrays of distinct values grouped from individual rows.
cifs_sensitive_data_mip_labels_latestcifs_sensitive_data_mip_labelsReturns the most recent label decision per file, using FINAL to suppress duplicates.
cifs_sensitive_data_mip_labels_summarycifs_sensitive_data_mip_labelsReturns a summary of label decisions grouped by host, share, action, label name, and protection status. Includes decision counts and the timestamp range of first and last decisions.
cifs_effective_permissionscifs_permission_latest, cifs_share_permission_latestJoins NTFS and share permissions with resolved principal identities (local users, local groups, Active Directory users, Active Directory groups, and well-known SIDs) to produce one row per principal per path. Use this view to query who has access to a given path by name rather than by SID.
cifs_effective_accesscifs_effective_permissionsComputes the final effective access mask for each principal per path by combining NTFS allow and deny ACEs with share-level permissions. Use this view to determine the actual access a named user or group has to a file or directory.