-
What options are there for connecting to the warehouse? Eg: ODBC, a python module, etc
-
Is there a consensus around which of the options in #1 is the most featureful/best supported/most mature/etc option?
- It would most probably be
PyAthena
, as it does not have any other non-pythonic requirements.
- It would most probably be
-
Does the warehouse support namespaces/schemas/datasets (or similar)?
- Yes, it does -- see https://docs.aws.amazon.com/athena/latest/ug/create-database.html
-
Can schemas/namespaces be created using SQL? Eg:
create schema my_schema
- Yes, it does -- see https://docs.aws.amazon.com/athena/latest/ug/create-database.html
-
Does the warehouse support logical databases?
- I am not exactly certain what this means.
-
Does the warehouse support standard-ish SQL? Are there any noteworthy caveats?
-
As it is based on Presto, it supports "standard-ish" SQL, with some limitations.
-
There are also some further limitations when it comes to Hive DDL.
-
-
Are transactions supported?
- No, it does not seem so:
Athena does not support transaction-based operations (such as the ones found in Hive or Presto) on table data. For a full list of keywords not supported, see Unsupported DDL. -- https://docs.aws.amazon.com/athena/latest/ug/creating-tables.html
-
Can tables be created with create table schema.table as (...)?
-
Can views be created with create view schema.view as (...)?
-
Can tables/views be renamed with alter table {table_name} rename to {new_name}?
-
Does the warehouse support insert statements? Any caveats?
- Not directly (
INSERT INTO
can be found in https://docs.aws.amazon.com/athena/latest/ug/other-notable-limitations.html) but this is generally worked around using CTAS queries: https://docs.aws.amazon.com/athena/latest/ug/ctas.html
- Not directly (
-
Does the warehouse support delete statements? Any caveats?
- No, it does not seem to.
-
Does the warehouse support update statements? Any caveats?
- No, it does not seem to, but this is generally worked around using CTAS queries: https://docs.aws.amazon.com/athena/latest/ug/ctas.html
-
Does the warehouse support merge statements? Any caveats?
- No, it does not seem to.
-
Does the warehouse support drop table/drop view statements? Any caveats?
- Yes, it does.
See:
-
Does the warehouse support truncate statements? Any caveats?
- No, it does not seem to.
-
Does the warehouse support temporary tables? Any caveats?
- No, it does not seem to, see https://forums.aws.amazon.com/thread.jspa?threadID=249786
-
Can queries be cancelled?
- Yes, see
cancel
method in README: https://github.com/laughingman7743/PyAthena
- Yes, see
-
Are views bound to the relations they select from? Ie. do drop table statements require a ...cascade argument?
- No, it does not seem so. See https://docs.aws.amazon.com/athena/latest/ug/drop-view.html
-
Does the warehouse support querying for existing relations (ie. their existence and type)? Is this via an API call or a SELECT statement? Eg: select * from information_schema.tables.
- Yes, something like the following works
SELECT table_name FROM information_schema.tables WHERE table_schema = 'table_name'
-
Does the warehouse support querying for the the columns in a relation? Is this via an API call or a SELECT statement? Eg: select * from information_schema.columns
- Yes, something like the following works
SELECT table_schema, table_name, column_name, data_type, is_nullable, column_default, ordinal_position, comment FROM information_schema.columns
-
Can columns be added and removed using DDL? Eg: alter table add column ?
- No, it does not seem so: https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
-
Does the warehouse support non-standard performance configurations? Ie. clustering, partitioning, sort/dist keys, etc. What are they, and how are they used? Can they be supplied in create table as statements?
- Yes, it supports partitioning and bucketing, both of which can be supplied as part of
create table as
statements: https://docs.aws.amazon.com/athena/latest/ug/create-table-as.html
- Yes, it supports partitioning and bucketing, both of which can be supplied as part of
-
Which column types does the warehouse support? Are text types varchars (with sizes) or unsized string columns? Are numeric types (with fixed precision) supported? Is there a different type for timestamps with timezones? Any caveats?
- All supported data types (along with potential caveats) can be found here: https://docs.aws.amazon.com/athena/latest/ug/data-types.html
-
Does the warehouse support column-level constraints (eg. unique, not null, foreign key, primary key)? Are they enforced? Can they be defined in create table as statements?
- No, it does not seem so.
-
Are there other noteworthy quirks/features of the warehouse that have not been specified above? If so: please enumerate them here!
Last active
November 28, 2018 13:24
-
-
Save mrshu/fff58fad980581f01991048a611ff5a1 to your computer and use it in GitHub Desktop.
AWS Athena `dbt` information sheet
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment