<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/atom.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Posts tagged: duckdb</title>
  <id>https://waylonwalker.com/tags/duckdb/atom.xml</id>
  <updated>2023-07-31T22:36:12Z</updated>
  <subtitle>All posts with the tag &#34;duckdb&#34;</subtitle>
  <link href="https://waylonwalker.com/tags/duckdb/" rel="alternate" type="text/html"></link>
  <link href="https://waylonwalker.com/tags/duckdb/atom.xml" rel="self" type="application/atom+xml"></link>
  <author>
    <name>Waylon Walker</name>
  </author>
  <generator uri="https://github.com/WaylonWalker/markata-go">markata-go</generator>
  <entry>
    <title>💭 DuckDB vs. MotherDuck — should you switch to the cloud version...</title>
    <id>https://waylonwalker.com/thought-63/</id>
    <updated>2023-07-31T22:36:12Z</updated>
    <published>2023-07-31T22:36:12Z</published>
    <link href="https://waylonwalker.com/thought-63/" rel="alternate" type="text/html"></link>
    <summary type="text">!https://kestra.io/blogs/2023-07-28-duckdb-vs-motherduck</summary>
    <content type="html">&lt;div class=&#34;embed-card embed-card-external&#34;&gt;&#xA;  &lt;a href=&#34;https://kestra.io/blogs/2023-07-28-duckdb-vs-motherduck&#34; class=&#34;embed-card-link&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&#xA;    &lt;div class=&#34;embed-card-image&#34;&gt;&#xA;      &lt;img class=&#34;glightbox&#34; src=&#34;https://kestra.io/cdn-cgi/image/onerror=redirect,width=1201,height=676,format=webp/_astro/main.BpltYTV4.png&#34; alt=&#34;DuckDB vs. MotherDuck — should you switch to the cloud version? | Kestra — Why and when to use MotherDuck over local DuckDB&#34; loading=&#34;lazy&#34;/ data-glightbox=&#34;description: DuckDB vs. MotherDuck — should you switch to the cloud version? | Kestra — Why and when to use MotherDuck over local DuckDB&#34;&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;div class=&#34;embed-card-content&#34;&gt;&#xA;      &lt;div class=&#34;embed-card-title&#34;&gt;DuckDB vs. MotherDuck — should you switch to the cloud version? | Kestra&lt;/div&gt;&#xA;      &lt;div class=&#34;embed-card-description&#34;&gt;Why and when to use MotherDuck over local DuckDB&lt;/div&gt;&#xA;      &lt;div class=&#34;embed-card-meta&#34;&gt;kestra.io&lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;duckdb is a new in process database that has been making its rounds in analytics for its high performance in those applications.&lt;/p&gt;&#xA;&lt;p&gt;Mother duck is  a centeralized server that brings manages storage, data sharing and an ide to duckdb.&lt;/p&gt;&#xA;&lt;div class=&#34;admonition note&#34;&gt;&#xA;&lt;p class=&#34;admonition-title&#34;&gt;Note&lt;/p&gt;&#xA;&lt;p&gt;This post is a &lt;a href=&#34;/thoughts/&#34; class=&#34;wikilink&#34; data-title=&#34;Thoughts&#34; data-description=&#34;These are generally my thoughts on a web page or some sort of url, except a rare few don&amp;#39;t have a link. These are dual published off of my...&#34; data-date=&#34;2024-04-01&#34; data-preview=&#34;These are generally my thoughts on a web page or some sort of url, except a rare few don&amp;#39;t have a link. These are dual published off of my...&#34;&gt;thought&lt;/a&gt;. It’s a short note that I make&#xA;about someone else’s content online &lt;a href=&#34;/tags/thoughts/&#34; class=&#34;hashtag-tag&#34; data-tag=&#34;thoughts&#34; data-count=&#34;2&#34; data-reading-time=&#34;3&#34; data-reading-time-text=&#34;3 minutes&#34;&gt;#thoughts&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
  <entry>
    <title>💭 Harlequin SQL IDE - DuckDB</title>
    <id>https://waylonwalker.com/thought-35/</id>
    <updated>2023-07-28T14:59:37Z</updated>
    <published>2023-07-28T14:59:37Z</published>
    <link href="https://waylonwalker.com/thought-35/" rel="alternate" type="text/html"></link>
    <summary type="text">!https://duckdb.org/docs/guides/sql_editors/harlequin</summary>
    <content type="html">&lt;div class=&#34;embed-card embed-card-external&#34;&gt;&#xA;  &lt;a href=&#34;https://duckdb.org/docs/guides/sql_editors/harlequin&#34; class=&#34;embed-card-link  has-avatar has-avatar-before&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34; style=&#34;--favicon-url: url(&amp;#39;/assets/markata/link-avatars/duckdb.org.png&amp;#39;);&#34; data-favicon=&#34;/assets/markata/link-avatars/duckdb.org.png&#34;&gt;&#xA;    &lt;div class=&#34;embed-card-content&#34;&gt;&#xA;      &lt;div class=&#34;embed-card-title&#34;&gt;External Link&lt;/div&gt;&#xA;      &lt;div class=&#34;embed-card-meta&#34;&gt;duckdb.org&lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Harlequin is a pretty sweet example of what textual can be used to create.   Its a terminal based sql ide for DuckDB.&lt;/p&gt;&#xA;&lt;div class=&#34;admonition note&#34;&gt;&#xA;&lt;p class=&#34;admonition-title&#34;&gt;Note&lt;/p&gt;&#xA;&lt;p&gt;This post is a &lt;a href=&#34;/thoughts/&#34; class=&#34;wikilink&#34; data-title=&#34;Thoughts&#34; data-description=&#34;These are generally my thoughts on a web page or some sort of url, except a rare few don&amp;#39;t have a link. These are dual published off of my...&#34; data-date=&#34;2024-04-01&#34; data-preview=&#34;These are generally my thoughts on a web page or some sort of url, except a rare few don&amp;#39;t have a link. These are dual published off of my...&#34;&gt;thought&lt;/a&gt;. It’s a short note that I make&#xA;about someone else’s content online &lt;a href=&#34;/tags/thoughts/&#34; class=&#34;hashtag-tag&#34; data-tag=&#34;thoughts&#34; data-count=&#34;2&#34; data-reading-time=&#34;3&#34; data-reading-time-text=&#34;3 minutes&#34;&gt;#thoughts&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
  <entry>
    <title>💭 Python API - DuckDB</title>
    <id>https://waylonwalker.com/thought-34/</id>
    <updated>2023-07-28T14:59:37Z</updated>
    <published>2023-07-28T14:59:37Z</published>
    <link href="https://waylonwalker.com/thought-34/" rel="alternate" type="text/html"></link>
    <summary type="text">!https://duckdb.org/docs/api/python/overview.html</summary>
    <content type="html">&lt;figure&gt;&#xA;&lt;a href=&#34;/static/https://duckdb.org/docs/api/python/overview.html&#34; class=&#34;glightbox-link&#34;&gt;&lt;img class=&#34;glightbox&#34; src=&#34;/static/https://duckdb.org/docs/api/python/overview.html&#34; alt=&#34;https://duckdb.org/docs/api/python/overview.html&#34;/ data-glightbox=&#34;description: https://duckdb.org/docs/api/python/overview.html&#34;&gt;&lt;/a&gt;&#xA;&lt;/figure&gt;&#xA;&lt;p&gt;To persist data in duckdb you need to first make a connection to a duck db database.&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;con&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;duckdb&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;connect&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;file.db&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Then work off of the connection &lt;code&gt;con&lt;/code&gt; rather than &lt;code&gt;duckdb&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;con&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sql&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;CREATE TABLE test(i INTEGER)&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;con&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sql&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;INSERT INTO test VALUES (42)&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# query the table&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;con&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;table&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;test&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;show&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# explicitly close the connection&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;con&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;close&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&#34;admonition note&#34;&gt;&#xA;&lt;p class=&#34;admonition-title&#34;&gt;Note&lt;/p&gt;&#xA;&lt;p&gt;This post is a &lt;a href=&#34;/thoughts/&#34; class=&#34;wikilink&#34; data-title=&#34;Thoughts&#34; data-description=&#34;These are generally my thoughts on a web page or some sort of url, except a rare few don&amp;#39;t have a link. These are dual published off of my...&#34; data-date=&#34;2024-04-01&#34; data-preview=&#34;These are generally my thoughts on a web page or some sort of url, except a rare few don&amp;#39;t have a link. These are dual published off of my...&#34;&gt;thought&lt;/a&gt;. It’s a short note that I make&#xA;about someone else’s content online &lt;a href=&#34;/tags/thoughts/&#34; class=&#34;hashtag-tag&#34; data-tag=&#34;thoughts&#34; data-count=&#34;2&#34; data-reading-time=&#34;3&#34; data-reading-time-text=&#34;3 minutes&#34;&gt;#thoughts&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
  <entry>
    <title>💭 SQL on Pandas - DuckDB</title>
    <id>https://waylonwalker.com/thought-33/</id>
    <updated>2023-07-28T14:59:37Z</updated>
    <published>2023-07-28T14:59:37Z</published>
    <link href="https://waylonwalker.com/thought-33/" rel="alternate" type="text/html"></link>
    <summary type="text">!https://duckdb.org/docs/guides/python/sql_pandas</summary>
    <content type="html">&lt;div class=&#34;embed-card embed-card-external&#34;&gt;&#xA;  &lt;a href=&#34;https://duckdb.org/docs/guides/python/sql_on_pandas&#34; class=&#34;embed-card-link  has-avatar has-avatar-before&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34; style=&#34;--favicon-url: url(&amp;#39;/assets/markata/link-avatars/duckdb.org.png&amp;#39;);&#34; data-favicon=&#34;/assets/markata/link-avatars/duckdb.org.png&#34;&gt;&#xA;    &lt;div class=&#34;embed-card-content&#34;&gt;&#xA;      &lt;div class=&#34;embed-card-title&#34;&gt;Redirecting…&lt;/div&gt;&#xA;      &lt;div class=&#34;embed-card-meta&#34;&gt;duckdb.org&lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;duckdb can just query any pandas dataframe that is in memory.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;I tried running it against a list of objects and got this error.  Great error message that gives me supported types right in the message.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;Make&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;sure&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;that&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;posts&amp;#34;&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;is&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;either&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pandas&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;DataFrame&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;duckdb&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;DuckDBPyRelation&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pyarrow&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Table&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Dataset&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;RecordBatchReader&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Scanner&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;or&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;NumPy&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;ndarrays&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;with&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;supported&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;format&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&#34;admonition note&#34;&gt;&#xA;&lt;p class=&#34;admonition-title&#34;&gt;Note&lt;/p&gt;&#xA;&lt;p&gt;This post is a &lt;a href=&#34;/thoughts/&#34; class=&#34;wikilink&#34; data-title=&#34;Thoughts&#34; data-description=&#34;These are generally my thoughts on a web page or some sort of url, except a rare few don&amp;#39;t have a link. These are dual published off of my...&#34; data-date=&#34;2024-04-01&#34; data-preview=&#34;These are generally my thoughts on a web page or some sort of url, except a rare few don&amp;#39;t have a link. These are dual published off of my...&#34;&gt;thought&lt;/a&gt;. It’s a short note that I make&#xA;about someone else’s content online &lt;a href=&#34;/tags/thoughts/&#34; class=&#34;hashtag-tag&#34; data-tag=&#34;thoughts&#34; data-count=&#34;2&#34; data-reading-time=&#34;3&#34; data-reading-time-text=&#34;3 minutes&#34;&gt;#thoughts&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
</feed>