Sha256: 3e44194f00c771348b03707c18e0031c98e7140acec8abe971b36b47e2b900a1
Contents?: true
Size: 623 Bytes
Versions: 1
Compression:
Stored size: 623 Bytes
Contents
require_relative '../command' require_relative '../partition' module AmazonAthena module Commands class AlterTableDropPartition < AmazonAthena::Command def initialize(database_table, partitions) @database_table = database_table @partitions = partitions end def partition_clauses @partitions.map {|p| " #{p}"}.join(",\n") end def statement "ALTER TABLE #{@database_table} DROP\n#{partition_clauses};" end def run(connection) # TODO: Map fields directly connection.query(statement).raw_output end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
athena-cli-0.1.0 | lib/amazon_athena/commands/alter_table_drop_partition.rb |