Directory Tables

Directory tables store a catalog of staged files in cloud storage. Roles with sufficient privileges can query a directory table to retrieve file URLs to access the staged files, as well as other metadata.

A directory table is not a separate database object; rather, it is an implicit object layered on a stage. Both external (external cloud storage) and internal (i.e. Snowflake) stages support directory tables. A directory table has no grantable privileges of its own. A directory table must be added explicitly to a stage when the stage is created.

Conceptually, directory tables are similar to external tables in that they store file-level metadata about the data files in a stage. Query a directory table to retrieve the Snowflake-hosted file URL to each file in the stage. A file URL permits prolonged access to a specified file. That is, the file URL does not expire. The same file URL is returned by calling the BUILD_STAGE_FILE_URL function.

Next Topics: