Questions tagged [presto-jdbc]

What is Presto JDBC?

Presto JDBC is a JDBC driver for Presto, an open source distributed SQL query engine for running analytic queries against data sources of all sizes ranging from gigabytes to petabytes.

References

57 questions
3
votes
0 answers

Cant select data from Avro Table in presto

I have created Avro table in hive, using presto. using below query CREATE TABLE hive.psa_sbox.avro_testing ( id bigint ) WITH ( format = 'AVRO', external_location = 'my/datalake/data/folder/avro_data', avro_schema_url =…
Maqsood
  • 369
  • 4
  • 17
3
votes
0 answers

Presto local file connector testing

I deployed presto in my local machine and the server is up and running. I'm trying to access a local csv file named "poc.csv" using local file connector. I have created a file called localfile.properties under the etc/catalog folder. So, catalog is…
Gee162016
  • 67
  • 1
3
votes
3 answers

Unrecognized connection property 'url' when using Presto JDBC in Spark SQL

Here is my spark sql code, where I am trying to read a presto table based on this guide;  https://spark.apache.org/docs/latest/sql-data-sources-jdbc.html val df = spark.read .format("jdbc") .option("driver",…
Raj
  • 2,368
  • 6
  • 34
  • 52
2
votes
1 answer

How Retrieve JSON DATA using Where Condition In PRESTO?

WITH dataset AS (SELECT * FROM (VALUES (JSON '{"name": "Bob Smith", "org": "legal"}'), (JSON '{"name": "Susan Smith", "org": "engineering"}'), (JSON '{"name": "Jane Smith", "org": "finance"}') ) AS t (users) ) SELECT…
2
votes
1 answer

Trino API to get query history

Is there any way to get all the query history that is executed in trino? I need an API or query to get the history of the executed query.
2
votes
2 answers

Presto or Trino Custom UDF getting "do not match expected java types error"

I've created a custom udf that is registered but when I try to run select do_protect('abc@test.com','Test_EMAIL'); I am getting following error: io.trino.spi.TrinoException: Exact implementation of do_protect do not match expected java types Here…
2
votes
1 answer

GCP dataproc with presto - is there a way to run queries remotely via python using pyhive?

I am trying to run queries on a presto cluster I have running on dataproc - via python (using presto from pyhive) on my local machine. But I can't seem to figure out the host URL. Does GCP dataproc even allow accessing the presto clusters…
2
votes
1 answer

Skip malformed date parsing presto

I am using below query to parse date in presto: SELECT date_parse(t.up_date, '%c/%e/%Y %l:%i:%s %p') from table t Sample date is: 4/11/2021 12:30:00 PM But sometime we get date which is not cannot be parsed like "testdate" (Any string which is not…
Hardik
  • 31
  • 1
  • 4
2
votes
1 answer

presto SQL - Filter records if date column format is not matching yyyy-MM-dd

I need to get all the records from a table that has a date not matching with the format yyyy-MM-dd. Here, column ID is unique bigint column. start_date is of varchar datatype. Sample input: Expected output: Thanks
2
votes
0 answers

Is it possible to configure Presto with SpringJPA?

Based on the below error is see , Presto does not seem to be a valid dataSource that is compatible with Spring JPA Description: Failed to bind properties under 'spring.jpa.database' to org.springframework.orm.jpa.vendor.Database: Property:…
2
votes
1 answer

How to increase query execution time of Presto in Spark

I'm currently connecting to Presto using Spark. Our queries are getting timed out after 60m, to increase query execution time I've set query.max-execution-time parameters in getDBProperties() like below private def…
1
vote
0 answers

failed: Could not create connection to database server. Attempted reconnect 3 times. Giving up

I am trying to run mysql queries in presto-cli and I am not able to connect to mysql server. I have given the credentials correctly inside the catalog folder
1
vote
1 answer

Extract results from Presto in the form of JSON

I have a presto view from where I need to create nested JSON. I have tried with the below query: SELECT CAST(CAST(ROW('Sales (PTD)' as Ttl,unsale as Val) AS ROW(v1 VARCHAR, v2 VARCHAR)) AS JSON) from metrics_v where time_frame='PTD'; I need a JSON…
Sormita Chakraborty
  • 1,015
  • 2
  • 19
  • 36
1
vote
1 answer

Set up basic password authentication for JDBC connections in EMR using Presto

My use case is simple. I have an EMR cluster deployed through CDK running Presto using the AWS Data Catalog as the meta store. The cluster will be having just the default user running queries. By default, the master user is hadoop, which I can use…
rodrigocf
  • 1,951
  • 13
  • 39
  • 62
1
vote
0 answers

Spark SQL date conversion error from timestamp to string when using presto

I am trying to pull data from a table where the dates are in timestamp format 2019-06-31 19:00:00 I want to have them in string format as 20190631 It works if I choose get_pandas_df instead of get_spark_df but I need it in get_spark_df I have tried…
1
2 3 4