trino | Official repository of Trino , the distributed SQL query

 by   trinodb Java Version: 419 License: Apache-2.0

kandi X-RAY | trino Summary

kandi X-RAY | trino Summary

trino is a Java library typically used in Big Data, Spark, Hadoop applications. trino has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has medium support. You can download it from GitHub, Maven.

After building Trino for the first time, you can load the project into your IDE and run the server. We recommend using IntelliJ IDEA. Because Trino is a standard Maven project, you easily can import it into your IDE. In IntelliJ, choose Open Project from the Quick Start box or choose Open from the File menu and select the root pom.xml file.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              trino has a medium active ecosystem.
              It has 7963 star(s) with 2357 fork(s). There are 166 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 1956 open issues and 3275 have been closed. On average issues are closed in 670 days. There are 366 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of trino is 419

            kandi-Quality Quality

              trino has 0 bugs and 0 code smells.

            kandi-Security Security

              trino has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              trino code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              trino is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              trino releases are not available. You will need to build from source code and install.
              Deployable package is available in Maven.
              Build file is available. You can build the component from source.
              Installation instructions, examples and code snippets are available.
              trino saves you 2214113 person hours of effort in developing the same functionality from scratch.
              It has 1092742 lines of code, 78511 functions and 8409 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed trino and discovered the below as its top functions. This is intended to give you an instant insight into trino implemented functionality, and help decide if they suit your requirements.
            • Creates a partition writer .
            • Load partition .
            • Creates an orc page source .
            • Adapts a parameter to a method handle .
            • Convert an object to an expression .
            • Sets up the webi module .
            • Get the pipeline stats .
            • Gets the stats for the task .
            • Creates plan node stats from the given task stats .
            • Creates a join plan for the given criteria .
            Get all kandi verified functions for this library.

            trino Key Features

            No Key Features are available at this moment for trino.

            trino Examples and Code Snippets

            No Code Snippets are available at this moment for trino.

            Community Discussions

            QUESTION

            Don't want to double count in Filtered Aggregation
            Asked 2022-Mar-29 at 19:38

            Sample Data:

            shopper_id last_purchase_timestamp active_p30 active_p60 active_over_p90 1 2022-03-02 1:20:00 TRUE TRUE TRUE 2 2022-03-01 1:30:00 TRUE TRUE TRUE 3 2022-02-28 1:24:03 TRUE TRUE TRUE 4 2022-02-02 21:22:26 FALSE TRUE TRUE

            I want to count if the shopper was active (as in made their last purchase) in the last 30 days (starting march 5th), last 60 days, etc.

            My goal is to find how many shoppers bought their last item in the last 30 days, how many shoppers bought their last item in the last 60 days etc. However I do not want to double count.

            What I've attempted:

            ...

            ANSWER

            Answered 2022-Mar-29 at 19:02

            Add both upper and lower bounds to the filter so they do not intersect. Something along this lines:

            Source https://stackoverflow.com/questions/71667157

            QUESTION

            RPM installation Trino throws python dependency
            Asked 2022-Jan-26 at 10:17

            I'm trying to install Trino using RPM on Red Hat Enterprise Linux distribution. I install the Trino dependencies using the following commands:

            ...

            ANSWER

            Answered 2022-Jan-26 at 10:17

            An answers has been provided by @hashhar on this Github Issue if you actually have the correct dependencies installed:

            Source https://stackoverflow.com/questions/70851289

            QUESTION

            Presto SQL - Transforming array(BingTile) into geometry
            Asked 2022-Jan-12 at 10:50

            I'm trying to calculate the City area size by using Geospatial Functions like the bing_tiles_around(), geometry_union(), and st_area() with the below sample data.

            ...

            ANSWER

            Answered 2022-Jan-12 at 10:50

            bing_tiles_around returns array of BingTile while geometry_union expects array of Geometry so you need to transform one to another:

            Source https://stackoverflow.com/questions/70679094

            QUESTION

            Does Trino (formerly Presto) INSERT work with CTEs?
            Asked 2021-Dec-02 at 17:01

            I am trying to insert rows into a table with a query of this form:

            ...

            ANSWER

            Answered 2021-Dec-02 at 17:01

            I had the order of the CTE and INSERT backwards.

            This works:

            Source https://stackoverflow.com/questions/70203101

            QUESTION

            Superset with Trino Impersonation and LDAP
            Asked 2021-Dec-01 at 07:26

            I have a Trino cluster configured to use LDAP and I want to use Superset to connect to it.

            The Trino cluster uses HTTPS with a self signed certificate

            I managed to configure Superset to use LDAP, that's not the problem. I also managed to query Trino by having the following configuration:

            sqlalchemy URI: trino://myuser:mypassword@trino_server:8443, security extra config: {"connect_args": {"verify": false}}

            Now here's the problem: Under the security tab there's a checkbox that says "Impersonate logged in user (Presto, Trino, Hive and GSheets)" . I checked the box, and still the queries I execute run with the user "myuser" which is configured in the sqlalchemy URI, instead of the logged in user.

            I'm using Superset version 1.3.2

            Does anybody know how to solve this?

            ...

            ANSWER

            Answered 2021-Nov-08 at 19:34

            There are two components to get user impersonation working with Trino and Superset:

            1. A version of Superset that supports user impersonation with Trino.

            This was added officially in 1.3.0, and since you're on 1.3.2 that shouldn't be a problem.

            1. A Trino client that supports user impersonation.

            AFAIK the only Python client that currently works with Superset to connect to Trino is sqlalchemy-trino. I couldn't find any specific changes made for user impersonation until 0.4.0, but I have gotten this working with the older 0.3.0 version.

            There may be some other possibilities that could prevent user impersonation from working, but less likely:

            1. Make sure that all containers have a working version of sqlalchemy-trino installed. This depends on how you add Python requirements, but I believe I've seen cases where Superset containers don't have the same dependencies, i.e. the superset_app container has the correct module, but not the superset_worker container.

            2. Make sure that the HTTP headers in the requests going to Trino are not being modified. User impersonation works by authenticating with basic authentication but impersonating the user added in a HTTP header called 'X-Trino-User'. If the HTTP header is removed or changed, then the user impersonation won't work as expected.

            Source https://stackoverflow.com/questions/69821770

            QUESTION

            What causes table corruption error when reading hive bucket table in trino?
            Asked 2021-Dec-01 at 00:25

            First of all, the format of the data cannot be disclosed, but the bucket table is created through the following table creation statements and options in hive.

            1. Create DDL

            ...

            ANSWER

            Answered 2021-Nov-30 at 04:53

            Trino implements bucket validation. For this error to be thrown, the table is most likely truly corrupt.

            Bucket validation verifies that data is in the correct bucket as it reads, and therefore attempts to prevent incorrect query results.

            To test, the following SET SESSION clause can be added to your Trino query:

            SET SESSION hive.validate_bucketing=false

            The query will run, but it should be examined for incorrectly bucketed data.

            Source https://stackoverflow.com/questions/70155876

            QUESTION

            Validate list elements if they take X time to run in a loop
            Asked 2021-Nov-27 at 21:47

            I have a list that contains SQL code that can be executed in an external Trino CLI. So for instance, my nested list would look like:

            ...

            ANSWER

            Answered 2021-Nov-27 at 21:47

            Instead of actually running the query, you can ask Trino if the query syntax is valid. Just add the following to each of your queries:

            EXPLAIN (TYPE VALIDATE)

            https://trino.io/docs/current/sql/explain.html#explain-type-validate

            Source https://stackoverflow.com/questions/69687537

            QUESTION

            Unable to access WebUI when Trino is secured behind a load balancer and LDAP authentication is enabled
            Asked 2021-Nov-22 at 05:24

            I am setting up a development server for Trino using Trino's docker image. I need to integrate Trino to LDAP so we decided to secure Trino behind a load balancer (see here) but after enabling password authentication, we see the following when we access Trino (https://trino_domain) WebUI:

            My config.properties are as follows:

            By right I should be prompted with the usual login screen with the password field enabled. There is no errors in the logs. The only warning I could find is

            I could not find anything on google on this so I am not sure what is missing/wrong. Please help.

            ...

            ANSWER

            Answered 2021-Nov-22 at 05:24

            This is expected behavior when attempting to connect via http when the coordinator is configured for https.

            This video might help you configure Trino with a load balancer and LDAP: https://www.youtube.com/watch?v=KiMyRc3PSh0

            Source https://stackoverflow.com/questions/70033732

            QUESTION

            Spark Trino Connection
            Asked 2021-Nov-19 at 16:10

            Currently I am using Spark 3.2.0 with Trino 363. I am trying to connect to Trino but I am getting an error. Error message is as below.

            Exception in thread "main" java.sql.SQLException: Unrecognized connection property 'url'

            Please find below code which I am using.

            ...

            ANSWER

            Answered 2021-Nov-19 at 16:10

            I was able to run spark 3.2.0 with Trino 363. I have commented out below mentioned line and re build JDBC driver.

            Trino 363 JDBC Driver

            Source https://stackoverflow.com/questions/69772249

            QUESTION

            Athena (Trino SQL) parsing JSON document using fields (dot notation)
            Asked 2021-Sep-30 at 19:06

            Athena (Trino SQL) parsing JSON document (table column called document 1 in Athena) using fields (dot notation)

            If the underlying json (table column called document 1 in Athena) is in the form of {a={b ... I can parse it in Athena (Trino SQL) using

            ...

            ANSWER

            Answered 2021-Sep-30 at 19:06

            Dot notation works only for columns types as struct<…>. You can do that for JSON data, but judging from the error and your description this seems not to be the case. I assume your column is of type string.

            If you have JSON data in a string column you can use JSON functions to parse and extract parts of them with JSONPath.

            Source https://stackoverflow.com/questions/69363346

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install trino

            Mac OS X or Linux
            Java 11.0.11+, 64-bit
            Docker

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/trinodb/trino.git

          • CLI

            gh repo clone trinodb/trino

          • sshUrl

            git@github.com:trinodb/trino.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link