ladderlore
请求新指南
  • 输入服务名称,例如 S3 或 IAM。

服务 · 分析

Amazon Athena

Runs standard SQL queries directly on data in Amazon S3, with no servers to manage.

本课尚未翻译,暂以英文显示。

你
Athena
S3Glue
Results in seconds
  1. 1You write a query in standard SQL, in the console or from a BI tool.
  2. 2Athena looks up the table in the AWS Glue Data Catalog: its columns, its format and where its files are.
  3. 3Athena reads the files in Amazon S3 directly. Nothing is loaded first.
  4. 4The results come back in seconds, and you pay for the data the query scanned.
How Athena answers a SQL query on data in S3.

分步说明

  1. 1You write a query in standard SQL, in the console or from a BI tool.
  2. 2Athena looks up the table in the AWS Glue Data Catalog: its columns, its format and where its files are.
  3. 3Athena reads the files in Amazon S3 directly. Nothing is loaded first.
  4. 4The results come back in seconds, and you pay for the data the query scanned.
  • Where the data is

    Athena
    It stays in Amazon S3
    Redshift
    Loaded into the warehouse. Redshift can also read S3.
  • What you set up

    Athena
    No servers: define a table and query
    Redshift
    A cluster, or a serverless warehouse
  • You pay for

    Athena
    The data each query scans
    Redshift
    The warehouse capacity you run or use
  • Best for

    Athena
    Ad hoc questions and log searches
    Redshift
    Fast, repeated reports and dashboards on large, structured data
Athena and Redshift both use SQL, but they suit different jobs.

1 / 2

  • Where the data is

    Athena
    It stays in Amazon S3
    Redshift
    Loaded into the warehouse. Redshift can also read S3.
  • What you set up

    Athena
    No servers: define a table and query
    Redshift
    A cluster, or a serverless warehouse

2 / 2

  • You pay for

    Athena
    The data each query scans
    Redshift
    The warehouse capacity you run or use
  • Best for

    Athena
    Ad hoc questions and log searches
    Redshift
    Fast, repeated reports and dashboards on large, structured data
Athena and Redshift both use SQL, but they suit different jobs.

是什么

Amazon Athena is a serverless, interactive query service. You point it at data stored in Amazon Simple Storage Service (Amazon S3) and ask questions in standard SQL, a common language for querying data. There is nothing to load and no infrastructure to set up, and the results come back in seconds.

Athena reads common file formats, such as CSV, JSON and Apache Parquet. It learns the structure of your data, the tables and their columns, from the AWS Glue Data Catalog. It suits ad hoc queries, the one-off questions you ask when you need an answer, such as searching web server logs or AWS CloudTrail logs kept in S3.

是什么

You pay only for the queries you run, based on the amount of data each query scans. Compressed data and columnar formats such as Parquet cost less to query, because Athena reads less. Athena also connects to Amazon Quick, so query results can feed dashboards.

要记住

  • Serverless: no servers or clusters to manage.
  • Standard SQL, run directly on files in Amazon S3. Nothing is loaded first.
  • You pay per query, for the amount of data it scans.
  • Table definitions come from the AWS Glue Data Catalog.
  • Best for ad hoc, interactive queries, such as searching logs.

考试中

  • “Run SQL queries on data in Amazon S3 without managing infrastructure” points to Amazon Athena.
  • “Analyze log files stored in S3 now and then, and pay only when you query” points to Athena.
  • “Fast, repeated reports that join very large tables” points to Amazon Redshift instead.