specify # of task writers for AWS Athena `insert into ...` query?

Viewed 106
1 Answers

You can use bucketed_by and bucket_count. Here's an example from Examples of CTAS Queries - Amazon Athena:

CREATE TABLE ctas_avro_bucketed 
WITH (
      format = 'AVRO', 
      external_location = 's3://my_athena_results/ctas_avro_bucketed/', 
      partitioned_by = ARRAY['nationkey'], 
      bucketed_by = ARRAY['mktsegment'], 
      bucket_count = 3) 
AS SELECT key1, name1, address1, phone1, acctbal, mktsegment, comment1, nationkey 
FROM table1;
Related