895 questions
0
votes
0
answers
62
views
Timestamp precision (3) not supported for Iceberg. Use "timestamp(6)"
I am trying to create a incremental DBT model. The output is a Iceberg format based lakehouse which I am doing CRUD using Trino.
{{
config(
materialized='incremental',
incremental_strategy='...
1
vote
3
answers
159
views
Finding Repeated patterns in SQL?
Let's assume that we have a table containing the following column
URL Repeated
www.b.com/aa/aa/aa X
www.b.com/aa/ X
www....
0
votes
1
answer
133
views
Unable to Create Tables in Iceberg via Trino with MinIO and Iceberg REST Catalog
I'm setting up a data lake using the following stack, using docker compose.
MinIO + IceBerg Rest + Trino + Superset.
docker-compose.yml
version: "3.9"
services:
# ---------------- MinIO --...
0
votes
1
answer
84
views
Unable to run trino for iceberg table: Invalid value 'hadoop' for type CatalogType
I have generated iceberg table with spark java program. Now I want to access it via trino.
My docker compose is:
version: '3.8'
services:
trino:
image: trinodb/trino:latest
container_name: ...
0
votes
0
answers
54
views
Trino: USER ERROR — HIVE_EXCEEDED_SPLIT_BUFFERING_LIMIT
We are currently using Trino 457 version. This week we started updating Trino version. Starting from 459, we are facing a lot of
USER ERROR — HIVE_EXCEEDED_SPLIT_BUFFERING_LIMIT
io.trino.spi....
2
votes
1
answer
126
views
Dbt docs generate is not working with an odd error
When doing a dbt docs generate I receive the following error code:
13:54:01 Encountered an error while generating catalog: Database Error
TrinoExternalError(type=EXTERNAL, name=JDBC_ERROR, message=&...
0
votes
0
answers
248
views
Trino - HIVE_CANNOT_OPEN_SPLIT: Error opening Hive split
I am using Trino to read table in Hive.
However, the exception occurs sometimes.
TrinoExternalError(type=EXTERNAL, name=HIVE_CANNOT_OPEN_SPLIT, message="Error opening Hive split s3a://...
2
votes
1
answer
88
views
Safe hash of arbitrary map in Trino SQL / Athena
Using Trino SQL (actually AWS Athena implementation of Trino), I want to compute safe hashs of arbitrary MAP columns. By "arbitrary" I mean MAP that may have other MAP as values for certain ...
0
votes
0
answers
250
views
Trino dynamic catalog management: "Could not store catalog properties" when creating catalog inside container
I'm running a Trino container using Docker and trying to use dynamic catalog management via the CREATE CATALOG SQL command.
Here's how I set up my container using Python with the Docker SDK:
# Remove ...
0
votes
0
answers
132
views
Assistance Required: Resolving S3AFileSystem ClassNotFoundException in Trino
We are trying to setup trino with minIO and have encountered a persistent issue with our Trino configuration. Below is a detailed overview of our setup, the error we are facing, and the steps we have ...
0
votes
1
answer
190
views
Trino SQL split string into a MAP and then into a TABLE with dynamic column names so that all map keys are refected as column names
I have a base_table with a column containing strings similar to this, but with variable URL parameters being passed in:
Example String 1: product=product_a&page=page1&item=item_aaa
Example ...
0
votes
0
answers
92
views
Trino: Deltalake connector using S3 compatible storage and Hive metastore
I have deltatables in s3 (which is our private s3 compatible storage) and we want to query these tables using Trino with help of Hive.
We have Trino and Hive running as docker containers. Following ...
0
votes
2
answers
261
views
Cannot query Mongodb from Trino
I have setup Trino and MongoDB in a docker network.
The mongodb.properties:
connector.name=mongodb
mongodb.connection-url=mongodb://admin:admin@mongodb:27017/admin`
I have created a collection ...
0
votes
0
answers
97
views
How to convert nested window functions into SQL one-liner
Summary
Is there a way to accomplish the last_value of a sum using a single line of Trino SQL. Instead of nesting multiple SQL queries, like is done in the example I provided below.
Currently I use 2 ...
0
votes
0
answers
32
views
How parse PrestoTrino create table query with apache Calcite?
Consider the code:
import org.apache.calcite.config.Lex;
import org.apache.calcite.sql.SqlNode;
import org.apache.calcite.sql.parser.SqlParser;
import org.apache.calcite.sql.parser.ddl....
0
votes
1
answer
107
views
Referencing a CTE in a where clause
I'm trying to use a CTE at the top of my query to be referenced in WHERE clause in a separate CTE further down. For Example:
with ref as (
null email,
'("720884","70540")' ...
1
vote
2
answers
112
views
Amazon Athena - SQL Query to Return all rows for ID where one row meets a condition and does not meet a condition
I am trying to write a query to return ALL rows for an ID where a condition is met and a condition is not met for each ID on the Order table.
The conditions I want are to return all rows where the ID'...
2
votes
1
answer
105
views
How to find overlapping records and select the latest record?
I am trying to get on record from a list of overlapping records in Presto(Trillo) DB. There are columns like loc_id, prod_id, line_id, start_dt, end_dt, update_dt.
The records are like this
( source ...
0
votes
1
answer
109
views
How to calculate the Gauss error function erf/erfc in Trino (or SQL)
I need to calculate the Gauss error function erf or its complement erfc = 1−erf in Trino. I need it for the estimation of the p (probability) value of a deviation from a binomial distribution ...
1
vote
2
answers
956
views
problem with "WITH" statement on trino SQL, SQL Error [57]: ...: Schema must be specified when session schema is not set
I recently switched from PostgreSQL to trino, and I run into the problem, that I obviously can't write any WITH statement properly to make it run. I tried to research it but only problem I found is ...
0
votes
3
answers
72
views
Window over query not retrieving what I need
We are trying to create a query to do an aggregation on the data below. This is a skinny table, with log data for operations happening in a set of equipment. The equipment is identified in the "...
0
votes
0
answers
54
views
trino jars/classes not accessible during maven compilation. Getting "cannot access" issue for any classes from the trino jars
I have added trino jars (trino-main,trino-spi & trino-parser) in my maven project. When I open the project in IDE, I can see the jars getting properly loaded and I am able to see the suggestions ...
2
votes
1
answer
120
views
Extracting JSON data without knowing the key
I'm getting a headache trying to figure out how to read a JSON with the following format in Athena
{
"id": "1",
"key1": {
"dynamic_key_here": [
{&...
1
vote
1
answer
32
views
How to create an array by replacing values from another array?
I am looking for a way to create an array from another array based on the values of the second array with value mapping.
E.g.
Table A has columns id, some_array
and I have some value mapping in mind, ...
0
votes
0
answers
290
views
Trino Delta Lake connector fails to read _last_checkpoint file from MinIO
I'm experiencing an issue with Trino's Delta Lake connector when trying to query a Delta Lake table stored in MinIO. My setup involves Trino, MinIO, and Hive Metastore, all running in Docker ...