🗄️External Table
Also known as External Tables
A table that reads files kept in some other place. The data is not copied in.
Think of it like
It is like a book in another library. You can read it there, so you do not bring it home.
Example
Emma's web logs land in object storage each hour. An external table lets her query them with SQL right away.
Why it matters
Data can be queried the moment it lands. There is no copy to pay for or keep in step.
Definition
Example code
sql
CREATE EXTERNAL TABLE web_logs (
ts TIMESTAMP,
status INT,
url STRING
)
STORED AS PARQUET
LOCATION 's3://shop-data/logs/';Common mistake
Key takeaways
- 1Data stays put. The files are never moved.
- 2Only the shape is stored. The table is just a description.
- 3Files decide speed. Good formats make fast queries.