duckdb | DuckDB is an in-process SQL OLAP Database Management System | SQL Database library
kandi X-RAY | duckdb Summary
kandi X-RAY | duckdb Summary
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
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of duckdb
duckdb Key Features
duckdb Examples and Code Snippets
(pl.scan_csv("**/*.csv")
.distinct()
.collect())
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
Trending Discussions on duckdb
QUESTION
ANSWER
Answered 2022-Mar-30 at 03:50You have the wrong query to concat string, here is how you can fix it:
QUESTION
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:21it 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
QUESTION
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:
- Create a string out of a column and use that as a criteria (more than a 1k, which is the limit)
- Create a new table in the database and use that (don't have access)
- 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:16Answering 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.
QUESTION
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:32In 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).
QUESTION
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:54r1 = duckdb.query("""
SELECT f1 FROM parquet_scan('test.pq') WHERE f2 > 1
""")
QUESTION
I am trying to use pool
to connect to my DuckDB/SQLite database .
ANSWER
Answered 2021-May-10 at 10:47I 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
QUESTION
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:36CMake 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.
QUESTION
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:11This 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.
QUESTION
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:27Seems 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
QUESTION
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:18Try this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install duckdb
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page