Skip to content

Instantly share code, notes, and snippets.

@tchikuba tchikuba/client.rb

Created May 20, 2015
What would you like to do?
# @param [String] db_name
# @param [String] q
# @param [String] result_url
# @param [Fixnum] priority
# @param [Fixnum] retry_limit
# @param [Hash] opts
# @return [Job]
def query(db_name, q, result_url=nil, priority=nil, retry_limit=nil, opts={})
# for compatibility, assume type is hive unless specifically specified
type = opts[:type] || opts['type'] || :hive
raise ArgumentError, "The specified query type is not supported: #{type}" unless [:hive, :pig, :impala, :presto].include?(type)
job_id = @api.query(q, type, db_name, result_url, priority, retry_limit, opts), job_id, type, q)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.