![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Presto is a distributed SQL query engine for big data: https://prestosql.io/
This is a client library for Ruby to run queries on Presto.
require 'presto-client'
# create a client object:
client = Presto::Client.new(
server: "localhost:8880", # required option
ssl: {verify: false},
catalog: "native",
schema: "default",
user: "frsyuki",
password: "********",
time_zone: "US/Pacific",
language: "English",
properties: {
"hive.force_local_scheduling": true,
"raptor.reader_stream_buffer_size": "32MB"
},
http_proxy: "proxy.example.com:8080",
http_debug: true
)
# run a query and get results as an array of arrays:
columns, rows = client.run("select * from sys.node")
rows.each {|row|
p row # row is an array
}
# run a query and get results as an array of hashes:
results = client.run_with_names("select alpha, 1 AS beta from tablename")
results.each {|row|
p row['alpha'] # access by name
p row['beta']
p row.values[0] # access by index
p row.values[1]
}
# run a query and fetch results streamingly:
client.query("select * from sys.node") do |q|
# get columns:
q.columns.each {|column|
puts "column: #{column.name}.#{column.type}"
}
# get query results. it feeds more rows until
# query execution finishes:
q.each_row {|row|
p row # row is an array
}
end
# killing a query
query = client.query("select * from sys.node")
query_id = query.query_info.query_id
query.each_row {|row| ... } # when a thread is processing the query,
client.kill(query_id) # another thread / process can kill the query.
$ bundle exec rake modelgen:latest
true
enables SSL and verifies server certificate using system's built-in certificates.{verify: false}
enables SSL but doesn't verify server certificate.OpenSSL::X509::Store
object used for verificationOpenSSL::X509::Certificate
object as client certificateOpenSSL::PKey::RSA
or OpenSSL::PKey::DSA
object used for client certificatehive-cdh4
, hive-hadoop1
, etc.FROM myschema.table1
to use non-default schemas.format_datetime
.format_datetime
.hive.force_local_scheduling: true
, raptor.reader_stream_buffer_size: "32MB"
, etc.See RDoc for the full documentation.
lib/presto/client/version.rb
to the next version.ChangeLog.md
file automatically.$ ruby release.rb
$ git commit -am "vX.Y.Z"
$ git tag "vX.Y.Z"
% git push --tags
$ gem build presto-client.gemspec
$ gem push presto-client-X.Y.Z.gem
FAQs
Unknown package
We found that presto-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.