duckdb | DuckDB is an in-process SQL OLAP Database Management System | SQL Database library

 by   duckdb C++ Version: 0.10.3.dev943 License: MIT

kandi X-RAY | duckdb Summary

kandi X-RAY | duckdb Summary

duckdb is a C++ library typically used in Database, SQL Database, PostgresSQL, MariaDB applications. duckdb has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

DuckDB is a high-performance analytical database system. It is designed to be fast, reliable and easy to use. DuckDB provides a rich SQL dialect, with support far beyond basic SQL. DuckDB supports arbitrary and nested correlated subqueries, window functions, collations, complex types (arrays, structs), and more. For more information on the goals of DuckDB, please refer to the Why DuckDB page on our website.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              duckdb has a medium active ecosystem.
              It has 10619 star(s) with 982 fork(s). There are 146 watchers for this library.
              There were 8 major release(s) in the last 6 months.
              There are 518 open issues and 2762 have been closed. On average issues are closed in 88 days. There are 38 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of duckdb is 0.10.3.dev943

            kandi-Quality Quality

              duckdb has 0 bugs and 0 code smells.

            kandi-Security Security

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

            kandi-License License

              duckdb is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              duckdb releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.
              It has 14012 lines of code, 1242 functions and 198 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of duckdb
            Get all kandi verified functions for this library.

            duckdb Key Features

            No Key Features are available at this moment for duckdb.

            duckdb Examples and Code Snippets

            create a polars dataframe containing unique values from a set of CSVs
            Pythondot img1Lines of Code : 4dot img1License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            (pl.scan_csv("**/*.csv")
             .distinct()
             .collect())
            
            DuckDB python API: query composition
            Pythondot img2Lines of Code : 13dot img2License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            r1 = duckdb.query("""
            SELECT f1 FROM parquet_scan('test.pq') WHERE f2 > 1
            """) 
            
            result = r1.execute()
            
            r1.create_view('table_name')
            
            conn = duckdb.connect()
            conn.e

            Community Discussions

            QUESTION

            How should I fix this code with RuntimeError: Catalog Error: Schema with name a does not exist!? (SQL)
            Asked 2022-Mar-30 at 03:50

            I have 2 tables as shown below:

            I want to find the Employee's Full name with Grad and Salary which order by City. Here is my code:

            ...

            ANSWER

            Answered 2022-Mar-30 at 03:50

            You have the wrong query to concat string, here is how you can fix it:

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

            QUESTION

            create a polars dataframe containing unique values from a set of CSVs
            Asked 2022-Feb-24 at 15:43

            I have +3000 CSVs with +10 columns. What I need is to get all unique values from just two of these. I am able to read unique values in polars:

            ...

            ANSWER

            Answered 2021-Nov-17 at 14:21

            it sounds like merge k sorted arrays, i've found a article for the solution, wish it could help: https://medium.com/outco/how-to-merge-k-sorted-arrays-c35d87aa298e

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

            QUESTION

            Python or R -- create a SQL join using a dataframe
            Asked 2021-Nov-09 at 07:16

            I am trying to find a way, either in R or Python, to use a dataframe as a table in an Oracle SQL statement. It is impractical, for my objective, to:

            1. Create a string out of a column and use that as a criteria (more than a 1k, which is the limit)
            2. Create a new table in the database and use that (don't have access)
            3. Download the entire contents of the table and merge in pandas (millions of records in the database and would bog down the db and my system)

            I have found packages that will allow you to "register" a dataframe and have it act as a "table/view" to allow queries against it, but it will not allow them to be used in a query with a different connection string. Can anyone point me in the right direction? Either to allow two different connections in the same SQL statement (to Oracle and a package like DuckDB) to permit an inner join or direct link to the dataframe and allow that to be used as a table in a join?

            SAS does this so effortlessly and I don't want to go back to SAS because the other functionality is not as good as Python / R, but this is a dealbreaker if I can't do database extractions.

            ...

            ANSWER

            Answered 2021-Nov-09 at 07:16

            Answering my own question here -- after much research. In short, this cannot be done. A series of criteria, outside of a list or concat, you cannot create a dataframe in python or R and pass it through a query into a SQL Server or Oracle database. It's unfortunate, but if you don't have permissions to write to temporary tables in the Oracle database, you're out of options.

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

            QUESTION

            How do I insert Infinity values into REAL/FLOAT4 Columns in DuckDB?
            Asked 2021-Sep-14 at 19:32

            Say I have a table called table_1 with a single column called col_1 that is of type REAL/FLOAT4 in DuckDB. How do I insert special float values like -Infinity, NaN, and Infinity into col_1? I have tried inserting those values many different ways such as "infinity", "+infinity", "inf", "+inf", etc., but with no luck. I was able to get the values to insert into a PostgreSQL table but not with DuckDB, even though they both have the same description for using and updating to these values on their webpages. For instance, here are some sample insert statements that work in my PostgreSQL table with a REAL column, but not in my DuckDB table.

            ...

            ANSWER

            Answered 2021-Sep-14 at 19:32

            In DuckDB we don't allow special float numbers to be stored in the columns.

            It just complicates some algorithms and (I heard that) it’s not technically allowed in the SQL standard (although I've never verified that myself).

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

            QUESTION

            DuckDB python API: query composition
            Asked 2021-Jul-30 at 12:54

            Suppose I use DuckDB with python, for querying an Apache parquet file test.pq with a table containing two columns f1 and f2.

            ...

            ANSWER

            Answered 2021-Jul-30 at 12:54
            r1 = duckdb.query("""
            SELECT f1 FROM parquet_scan('test.pq') WHERE f2 > 1
            """) 
            

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

            QUESTION

            Pool: Can't open database
            Asked 2021-May-10 at 10:47

            I am trying to use pool to connect to my DuckDB/SQLite database .

            ...

            ANSWER

            Answered 2021-May-10 at 10:47

            I experienced the same issue and it seems to be an incompatibility between the pool and dbplyr version.

            For version of pool 0.1.5 and up you need to used dbplyr version 2.0.0 and up. If you use lower version of dbplyr e.g. 1.4.4 you need to downgrade your pool to e.g. 0.1.4.3

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

            QUESTION

            How do I edit the source files of a c++ project in Visual Studio?
            Asked 2021-Apr-12 at 21:36

            I know this seems like a strange question, but apparently the answer isn't a simple as "Open it in Visual Studio and edit it".

            I have an idea for this project, and I would like to try my hand at implementing it.

            Despite appearances, I do have a background in programming, just not much in c++. I do a lot of .Net stuff day to day (C# and F#). I can read c++, pretty comfortable editing it, and can even write something simple from scratch!

            Anyway, in .net things are simple. You have a solution, which contains a bunch of projects, and when you build it you get a exe or dll out the other side.

            In this project, there seems to be a 2 step process. First I used cmake to prepare a VS2019 solution, then (secondly) I can open that solution in Visual Studio and build it to get the exe.

            However, the solution that results from the first step does not seem to contain the source code. Specifically, this is the file I am interested in playing around with. But it does not appear in the cmake results.

            I could open the file and edit it before the cmake step, but then Visual Studio does not understand the context of the code and it is basically just a text editor at that point.

            So how do I edit this file in a project in Visual Studio, and have all the benefit of VS knowing how this small piece of code fits into the whole project?

            ...

            ANSWER

            Answered 2021-Apr-12 at 21:36

            CMake is used to build the project, that is compile and link the needed files to make the executables/libraries. As with many open source projects, you are left to your own devices to use it in an IDE. This has the advantage every contributor can use their own prefered environment. It has the disadvantage that it can be a little complicated to set up. But the source files are just that - they are source files. You could edit them in Notepad if you want. C++ doesn't have a concept of "projects" or "solutions". Those are workflows your IDE (Visual Studio) imposes on you.

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

            QUESTION

            DuckDB won't compile on free AWS EC2 instance. Are precompiled packages the solution?
            Asked 2021-Mar-09 at 10:11

            I'm trying to set up a shiny server on the free tier AWS EC2 to test my app but I can't get all the packages compiled and installed.

            e.g. duckdb

            in the terminal connected to my instance I paste:

            ...

            ANSWER

            Answered 2021-Mar-09 at 10:11

            This is indeed due to the lack of RAM on the free tier VM. Binary packages would indeed solve this. But will see whether we can do something about that as well.

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

            QUESTION

            how to vacuum (reduce file size) on duckdb
            Asked 2021-Mar-05 at 22:27

            I am testing duckdb database for analytics and I must say is very fast. The issue is the database file is growing and growing but I need to make it small to share it.

            In sqlite I recall to use the VACUUM commadn, but here same command is doing nothing. Size is the same.

            how to reduce file size for duckdb database?

            ...

            ANSWER

            Answered 2021-Mar-05 at 22:27

            Seems that this option is not available yet. What I use is EXPORT database command , create a new clean data file and then IMPORT.

            Documentation here https://duckdb.org/docs/sql/statements/export

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

            QUESTION

            How to create multi-column indices DuckDB/SQLite?
            Asked 2021-Feb-26 at 10:18

            I have a DuckDB with columns of data which I would like to query using multiple columns. I'm in R but I'm not sure how to create a multicolumn index (or even a single column index). Can anyone suggest a reference please? I've added SQLite as a tag because I gather that the commands could be the same.

            Edit: Based on kukuk1de's recommendation I'm trying the following

            ...

            ANSWER

            Answered 2021-Feb-26 at 10:18

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

            Vulnerabilities

            No vulnerabilities reported

            Install duckdb

            If you want to install and use DuckDB, please see our website for installation and usage instructions.

            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
            Install
          • PyPI

            pip install duckdb

          • CLONE
          • HTTPS

            https://github.com/duckdb/duckdb.git

          • CLI

            gh repo clone duckdb/duckdb

          • sshUrl

            git@github.com:duckdb/duckdb.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