AmazonAthena.Databases
Amazon Athena's catalogs, databases and tables, through an Athena ODBC data source on this computer.
Group: Databases and lakes. Power Query M has it too: a query that uses it is written as in Power BI.
Syntax
AmazonAthena.Databases(dsn as text, optional role as nullable text, optional options as nullable record) as table
| Parameter | Type | Description |
|---|---|---|
dsn | text | The name of a data source set up with an Athena ODBC driver (Amazon's or Simba's). |
role | nullable text optional | An AWS role to assume; accepted, and not read here. |
options | nullable record optional | Accepted as Power Query writes it; none is read. |
Returns
table. A navigation table: the catalogs (AwsDataCatalog), their databases, then the tables and views.
Remarks
- It navigates as
Odbc.DataSourcedoes with HierarchicalNavigation: catalog, database, table. - The data source holds the region, the query results location and the workgroup; the sign-in holds the credentials.
- A table's Data is read through the driver when it is used; the steps after it run in DuckDB.
Examples
Down to the orders table
let
Source = AmazonAthena.Databases("AthenaSales"),
Catalog = Source{[Name = "AwsDataCatalog"]}[Data],
Sales = Catalog{[Name = "sales"]}[Data],
Orders = Sales{[Name = "orders"]}[Data]
in
Orders
Result: not shown here: it needs Amazon Athena's ODBC driver, a data source and a sign-in.