<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Brian Thomas Smith</title>
    <description>The latest articles on DEV Community by Brian Thomas Smith (@bsmth).</description>
    <link>https://dev.to/bsmth</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F564386%2Fc9fad227-990e-44a1-a48c-4494a05a1c01.jpeg</url>
      <title>DEV Community: Brian Thomas Smith</title>
      <link>https://dev.to/bsmth</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bsmth"/>
    <language>en</language>
    <item>
      <title>Monaco Editor, Prometheus &amp; Alertmanager support in QuestDB</title>
      <dc:creator>Brian Thomas Smith</dc:creator>
      <pubDate>Wed, 05 Jan 2022 15:25:14 +0000</pubDate>
      <link>https://dev.to/questdb/monaco-editor-prometheus-alertmanager-support-in-questdb-1dbn</link>
      <guid>https://dev.to/questdb/monaco-editor-prometheus-alertmanager-support-in-questdb-1dbn</guid>
      <description>&lt;p&gt;QuestDB version 6.1.3 includes Prometheus Alertmanager support, new counters in the Prometheus endpoint for memory info, automatic query timeout, Monaco as the new SQL editor for QuestDB's web interface, and more UI additions. Here's a roundup of changes!&lt;/p&gt;

&lt;h2&gt;
  
  
  Monaco Editor from VS Code in QuestDB UI
&lt;/h2&gt;

&lt;p&gt;The SQL editor in QuestDB's web console now includes the&lt;br&gt;
&lt;a href="https://microsoft.github.io/monaco-editor/" rel="noopener noreferrer"&gt;Monaco Editor that powers VS Code&lt;/a&gt;. Upgrading the SQL editor to use the Monaco Editor brings with it many improvements and functionality that comes by default with VS Code, so now you get convenient features like bracket matching, find and replace-all, multiple cursor selection, and more right out of the box:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flb9pg3iizy2uwiozu2cg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flb9pg3iizy2uwiozu2cg.png" alt="Find all functionality in the Monaco Editor within QuestDB database"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For more information on using the Monaco Editor in QuestDB, type F1 in QuestDB's web console, or refer to the official &lt;a href="https://code.visualstudio.com/docs/editor/codebasics" rel="noopener noreferrer"&gt;Monaco documentation&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  Prometheus metrics
&lt;/h2&gt;

&lt;p&gt;Prometheus is an open-source systems monitoring and alerting toolkit which collects and stores metrics as time series data. Prometheus collects small pieces of data about many components to help build a picture of the state and trajectory of a system. The scraped metrics are stored, and rules can be applied to aggregate and generate new metrics from existing data or generate alerts based on user-defined triggers.&lt;/p&gt;

&lt;p&gt;QuestDB has a &lt;code&gt;/metrics&lt;/code&gt; HTTP endpoint on port &lt;code&gt;9003&lt;/code&gt; which provide counters in Prometheus format. Prometheus can be used to visualize and graph QuestDB metrics prefixed with &lt;code&gt;questdb_&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2u5mflc6ucj83if1z6xu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2u5mflc6ucj83if1z6xu.png" alt="Prometheus graphing tab showing QuestDB instance metrics on a chart"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For more information on configuring QuestDB and Prometheus to graph QuestDB metrics, see the &lt;a href="https://dev.to/docs/third-party-tools/prometheus/"&gt;Prometheus documentation&lt;/a&gt; for examples and hints for setup and configuration.&lt;/p&gt;
&lt;h2&gt;
  
  
  Prometheus Alertmanager
&lt;/h2&gt;

&lt;p&gt;Release 6.1.3 introduces a new log writer for QuestDB that sends any message to Prometheus &lt;a href="https://prometheus.io/docs/alerting/latest/alertmanager/" rel="noopener noreferrer"&gt;Alertmanager&lt;/a&gt;. To configure this writer, add it to the &lt;code&gt;writers&lt;/code&gt; config alongside other log writers. Details on logging configuration can be found on the &lt;a href="https://dev.to/docs/reference/configuration/#configuration-file"&gt;server configuration documentation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Configuring that QuestDB should send alerts to Alertmanager alerting is done in QuestDB's log config with the address and port for Alertmanager:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# The writers to enable&lt;/span&gt;
&lt;span class="nv"&gt;writers&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;stdout,alert

&lt;span class="c"&gt;# Prometheus Alertmanager&lt;/span&gt;
w.alert.class&lt;span class="o"&gt;=&lt;/span&gt;io.questdb.log.LogAlertSocketWriter
w.alert.level&lt;span class="o"&gt;=&lt;/span&gt;CRITICAL
w.alert.alertTargets&lt;span class="o"&gt;=&lt;/span&gt;172.17.0.2:9093
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For details on configuring QuestDB to send alerts to Alertmanager, see the &lt;a href="https://dev.to/docs/third-party-tools/prometheus/"&gt;Prometheus documentation&lt;/a&gt; for examples and guides for setup and configuration.&lt;/p&gt;

&lt;h2&gt;
  
  
  SQL syntax for bulk inserts
&lt;/h2&gt;

&lt;p&gt;It's now possible to bulk insert vales into a table via SQL. This functionality follows the 'multirow' &lt;code&gt;VALUES&lt;/code&gt; syntax used in PostgreSQL and acts as an accelerator when inserting data in bulk:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;my_table&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="n"&gt;SYMBOL&lt;/span&gt; &lt;span class="k"&gt;index&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;val&lt;/span&gt; &lt;span class="nb"&gt;DOUBLE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;ts&lt;/span&gt; &lt;span class="nb"&gt;TIMESTAMP&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="nb"&gt;timestamp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ts&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;INSERT&lt;/span&gt; &lt;span class="k"&gt;INTO&lt;/span&gt; &lt;span class="n"&gt;my_table&lt;/span&gt;
&lt;span class="k"&gt;VALUES&lt;/span&gt;
    &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'d1'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;101&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'2021-10-05T11:31:35.878Z'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'d1'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;101&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'2021-10-05T12:31:35.878Z'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'d2'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;201&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'2021-10-05T12:31:35.878Z'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'d2'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;201&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'2021-10-05T13:31:35.878Z'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'d2'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;201&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'2021-10-05T14:31:35.878Z'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Automatic SQL query timeout
&lt;/h2&gt;

&lt;p&gt;Users can now define automatic timeouts for SQL queries via server configuration. This is set using the &lt;code&gt;query.timeout.sec&lt;/code&gt; server configuration and is a global timeout in seconds used for long-running queries. For more&lt;br&gt;
information on setting this parameter, see the &lt;a href="https://dev.to/docs/reference/configuration/"&gt;server configuration documentation&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Default is 60 sec&lt;/span&gt;
query.timeout.sec&lt;span class="o"&gt;=&lt;/span&gt;10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Next up
&lt;/h2&gt;

&lt;p&gt;The team have added Java 17 support and are working on a JIT (Just-in-time) compiler for filters which will massively improve performance of queries using &lt;code&gt;WHERE&lt;/code&gt; clauses.&lt;/p&gt;

&lt;p&gt;We hope you enjoyed the latest roundup, for the complete list of additions and fixes, see the &lt;a href="https://github.com/questdb/questdb/releases/tag/6.1.3" rel="noopener noreferrer"&gt;release notes on GitHub&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Feel free to reach out to let us know how we're doing or just come by and say hello &lt;a href="//slack.questdb.io"&gt;in our Slack Community&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>database</category>
      <category>timeseries</category>
      <category>opensource</category>
      <category>monitoring</category>
    </item>
    <item>
      <title>QuestDB raises $12M Series A as the adoption of its time series database grows</title>
      <dc:creator>Brian Thomas Smith</dc:creator>
      <pubDate>Thu, 04 Nov 2021 09:53:05 +0000</pubDate>
      <link>https://dev.to/questdb/questdb-raises-12m-series-a-as-the-adoption-of-its-time-series-database-grows-1j26</link>
      <guid>https://dev.to/questdb/questdb-raises-12m-series-a-as-the-adoption-of-its-time-series-database-grows-1j26</guid>
      <description>&lt;p&gt;To continue development on &lt;a href="https://github.com/questdb/questdb"&gt;QuestDB&lt;/a&gt;, the open source database for time series, we have raised a $12 million Series A investment led by 468 Capital, with participation from Uncorrelated Ventures and more than 15 enterprise open source founders and executives to grow the team, increase product development and accelerate adoption. In tandem with the funding round, Florian Leibert, co-founder of Mesosphere, joined QuestDB’s board of directors.&lt;/p&gt;

&lt;h2&gt;
  
  
  Funded by leaders in open source
&lt;/h2&gt;

&lt;p&gt;The backing comes from innovators such as Tom Preston-Werner, GitHub co-founder, Sebastien Pahl, Docker co-founder, Alexis Ohanian, Reddit co-founder, Mirko Novakovic, Instana co-founder, Andrey Alekseev, NGINX co-founder and Tobi Knaup, D2iQ CEO, as well as Michael Li, VP Data at Coinbase and Grace Francisco, VP Developer Relations Strategy at Cisco.&lt;/p&gt;

&lt;p&gt;The round of funding was also made possible with participation from Sumedh Pathak, Citus Data co-founder, James Hawkins, PostHog CEO, Paul Copplestone, Supabase CEO, and Dan Pinto, FingerprintJS CEO. QuestDB is now supported by investors who bring years of collective experience in open source and enterprise software domains and have invested personally in the expansion and success of the company at a phase of rapid growth.&lt;/p&gt;

&lt;p&gt;The infusion of funds will support continued growth and drive product innovation, building up support and success functions to meet expanding user demand. These resources will enable us to continue powering high-performance applications that rely on robust, easy-to-use analytics. This round also allows the engineering team behind QuestDB to develop new features for a cloud-native database and launch a DBaaS platform that offers fully managed time series database solutions.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fastest open source time series database
&lt;/h2&gt;

&lt;p&gt;Developers rely on QuestDB for time series insights and real-time applications in FinTech, DevOps monitoring, asset tracking, Big Data, machine learning engines, digital factories, geospatial analysis, autonomous vehicles, and a growing list of use cases that depend on high-performance ingestion and queries over massive data sets in real-time. Collecting data quickly and efficiently allows for the storage of vast amounts of information without wasting compute resources; making sense of the collected data is a different challenge.&lt;/p&gt;

&lt;p&gt;QuestDB allows developers to use SQL as a query language to answer questions about how their data looks without the barrier of entry that comes with proprietary query languages. Analyzing historical aspects of data allows users to understand changes over time, identify patterns, and make better decisions on future trends. The engineering team behind QuestDB has built a system that's easier to use and more powerful than open source alternatives by providing support for SQL, faster queries through massively parallelized execution via SIMD, and ingestion speeds that reach millions of rows per second.&lt;/p&gt;

&lt;h2&gt;
  
  
  Driven by product-led growth
&lt;/h2&gt;

&lt;p&gt;The QuestDB team is dedicated to improving product functionality and enhancements, and regularly delivers features and stability improvements. In the last six months alone, the engineering team has delivered geospatial data support, out-of-order data ingestion, new SQL extensions and accelerators for working with time series data and time zones, along with &lt;a href="https://aws.amazon.com/marketplace/pp/prodview-cddeafdirexw6?sr=0-1&amp;amp;ref_=beagle&amp;amp;applicationId=AWSMPContessa"&gt;AWS Marketplace&lt;/a&gt; offerings and &lt;a href="https://marketplace.digitalocean.com/apps/questdb"&gt;DigitalOcean applications&lt;/a&gt; for flexible deployments. These features empower users to work with complex data sets, including spatial data and allow developers to quickly and easily build time series applications where their infrastructure operates.&lt;/p&gt;

&lt;p&gt;Since QuestDB &lt;a href="https://news.ycombinator.com/item?id=23975807"&gt;launched at Y Combinator&lt;/a&gt; one year ago, the company has been embraced by developers looking for high-ingestion and query speeds, and an open source alternative to proprietary solutions. Engineers continue to support QuestDB, which now consists of a community of more than 10,000 developers and is reflected in the DB-Engines ranking, which shows &lt;a href="https://db-engines.com/en/ranking/time+series+dbms"&gt;a 187% increase in popularity&lt;/a&gt; over the last 12 months. The adoption of QuestDB continues to expand with unique deployed instances growing 20% per month, and powering the infrastructure of industry leaders such as &lt;a href="https://questdb.io/customers"&gt;Airbus and Yahoo&lt;/a&gt;. The success of this funding round increases the company's valuation 10 times versus seed a year ago and will invigorate product and community development in preparation for upcoming launches.&lt;/p&gt;

&lt;h2&gt;
  
  
  What users say about QuestDB
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;"QuestDB is used at Airbus for real-time applications involving hundreds of millions of data points per day. For us, QuestDB is an outstanding solution that meets (and exceeds) our performance requirements." - &lt;strong&gt;Oliver Pfeiffer, Software Architect, Airbus&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;"We use QuestDB to monitor metrics for autoscaling decisions within our ML engine that provides search, recommendation, and personalization via models and aggregations on continuously changing data." - &lt;strong&gt;Jon Bratseth, VP Architect, Yahoo&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;"When we set out to design the next generation of our execution platform, one of our requirements was large-scale model calibration based on real-time market data streams. QuestDB allows us to derive quick insights on live and historical data that would not be achievable with other open source time series databases." - &lt;strong&gt;Jean-François Perreton, Head of Algo Quant, Kepler Cheuvreux&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  About QuestDB
&lt;/h2&gt;

&lt;p&gt;QuestDB is an open source high-performance time series database built from the ground up to offer breakthrough performance for real-time analytics using SQL. The team behind QuestDB brings decades of experience and technical approaches from low-latency applications to leverage real-time data processing. QuestDB is a remote-first company and is backed by leading venture capital firms and Y Combinator. For more information, visit &lt;a href="https://questdb.io/"&gt;questdb.io&lt;/a&gt;, &lt;a href="https://github.com/questdb/questdb"&gt;QuestDB on GitHub&lt;/a&gt;, or follow &lt;a href="https://twitter.com/QuestDb"&gt;@QuestDB&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>database</category>
      <category>news</category>
      <category>timeseries</category>
    </item>
    <item>
      <title>A low-code bitcoin ticker built with QuestDB and n8n.io</title>
      <dc:creator>Brian Thomas Smith</dc:creator>
      <pubDate>Thu, 21 Jan 2021 14:01:08 +0000</pubDate>
      <link>https://dev.to/bsmth/a-low-code-bitcoin-ticker-built-with-questdb-and-n8n-io-4g25</link>
      <guid>https://dev.to/bsmth/a-low-code-bitcoin-ticker-built-with-questdb-and-n8n-io-4g25</guid>
      <description>&lt;p&gt;We've had many predictions of the emerging trends of 2020. Three that ended up ringing very true were the popularity of low-code platforms, the rise of time-series databases, and a digital currency boom. This tutorial combines these three topics into one example workflow automation that stores and analyzes Bitcoin market prices in QuestDB with a workflow template to get up and running quickly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;This tutorial will use the docker images for both QuestDB and n8n.io so users should ensure that they have the following installed and running on their system:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.docker.com/get-docker/"&gt;Docker Desktop&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Confirm that this is correctly set up by requesting the version number:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker &lt;span class="nt"&gt;--version&lt;/span&gt;
Docker version 20.10.2, build 2291f61
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What is a low-code platform
&lt;/h2&gt;

&lt;p&gt;low-code platforms allow for building applications without having to dig deep into code or technical implementation details. Most of the tools in this category use a visual editor and have drag-and-drop features to allow for quickly building systems that would otherwise require more intensive development resources. The main benefits are for users who either lack professional programming experience or don't want to invest time building applications from the ground up and manage rapidly-changing compatibility issues.&lt;/p&gt;

&lt;p&gt;A great platform that I've been using recently is &lt;a href="https://n8n.io/"&gt;n8n.io&lt;/a&gt;, which offers a creative and efficient visual editor for process automation. Over 200 integrations supported out-of-the-box means you have a lot to choose from if you want to start streaming data into QuestDB from the supported nodes quickly.&lt;/p&gt;

&lt;p&gt;This tutorial demonstrates how to use an n8n.io workflow that queries Bitcoin market prices via a REST API and uses QuestDB as a data store for the market prices as time series data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setup steps
&lt;/h2&gt;

&lt;p&gt;The first step will be to get n8n.io up and running using docker:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run &lt;span class="nt"&gt;-it&lt;/span&gt; &lt;span class="nt"&gt;--rm&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--name&lt;/span&gt; n8n &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-p&lt;/span&gt; 5678:5678 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-v&lt;/span&gt; ~/.n8n:/home/node/.n8n &lt;span class="se"&gt;\&lt;/span&gt;
  n8nio/n8n
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command mounts a volume with &lt;code&gt;-v&lt;/code&gt; so that user configurations will be saved at &lt;code&gt;~/.n8n&lt;/code&gt;. QuestDB can be started with the following docker command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run -p 9000:9000 -p 8812:8812 --name questdb-n8n questdb/questdb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By giving the container a name with &lt;code&gt;--name questdb&lt;/code&gt;, we have an easy way to refer to the container created by &lt;code&gt;run&lt;/code&gt; later on. If we want to re-use the same container (and its data!) after it has been stopped, we can use the following commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# bring the container up&lt;/span&gt;
docker start questdb-n8n
&lt;span class="c"&gt;# shut the container down&lt;/span&gt;
docker stop questdb-n8n
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Import an example workflow
&lt;/h2&gt;

&lt;p&gt;To get started with our example workflow, navigate to &lt;a href="http://localhost:5678/"&gt;http://localhost:5678/&lt;/a&gt;. In the left menu, click the greater-than icon &lt;strong&gt;&amp;gt;&lt;/strong&gt; to expand the menu and reveal a navigation panel. To help us along with the setup steps, we have a template that can be imported directly from a URL.&lt;/p&gt;

&lt;p&gt;Select &lt;strong&gt;Workflows&lt;/strong&gt; -&amp;gt; &lt;strong&gt;import from URL&lt;/strong&gt; and paste the following URL:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;https://questdb-docs.s3-eu-west-1.amazonaws.com/QuestDB_BTC_Ticker.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If imported successfully, the workflow will be generated automatically in the editor window:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xTytkMKo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/oh9b3k8phwqrk1yc2i3g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xTytkMKo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/oh9b3k8phwqrk1yc2i3g.png" alt="Submission form to import an n8n.io workflow from URL"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Each of the nodes with their configuration can be inspected at any time by double-clicking and inspecting the &lt;strong&gt;Parameters&lt;/strong&gt; and &lt;strong&gt;Settings&lt;/strong&gt; panel. From left-to-right we have the following objects:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;QuestDB&lt;/strong&gt; node which executes an SQL statement to create our &lt;code&gt;btc&lt;/code&gt; table&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;cron&lt;/strong&gt; node which is set to a 1 minute interval&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HTTP Request&lt;/strong&gt; node which makes a &lt;code&gt;GET&lt;/code&gt; request to a public API with latest BTC value in USD&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Set&lt;/strong&gt; node which selects the fields we are interested in from the HTTP response and assigns them the correct type&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;QuestDB&lt;/strong&gt; node which inserts incoming values from the Set node into a &lt;code&gt;btc&lt;/code&gt; table&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Connecting to QuestDB
&lt;/h2&gt;

&lt;p&gt;Before we activate the workflow, we have to provide connection credentials to QuestDB. In the left navigation menu, select &lt;strong&gt;Credentials&lt;/strong&gt; -&amp;gt; &lt;strong&gt;New&lt;/strong&gt; and choose type &lt;strong&gt;QuestDB&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The default configuration provides most of the information we need for a QuestDB instances running locally, but we will need to allow the QuestDB node access to these credentials in the &lt;strong&gt;Nodes with access&lt;/strong&gt; section.&lt;/p&gt;

&lt;p&gt;When correctly set up, the credentials configuration should look like the following:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sQdlaZsE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/i6zty0nphpofvf2xbtvi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sQdlaZsE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/i6zty0nphpofvf2xbtvi.png" alt="A credentials submission form for connecting n8n.io to QuestDB" title="Adding connection parameters for QuestDB"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Activating the workflow
&lt;/h2&gt;

&lt;p&gt;To check if the workflow is correctly configured, click the &lt;strong&gt;Execute Node&lt;/strong&gt; button on the first QuestDB node. On success, we should have a new table &lt;code&gt;btc&lt;/code&gt; with a &lt;code&gt;Timestamp&lt;/code&gt; and &lt;code&gt;price&lt;/code&gt; column. Activating the workflow with the toggle in the top-right of the workflow editor will prompt you to save the workflow if you have not done so already. Give the workflow the name &lt;code&gt;QuestDB BTC Ticker&lt;/code&gt; and click &lt;strong&gt;Save&lt;/strong&gt;. If everything is set up correctly, we will have a success indicator on each of the nodes which are passing as expected and a notification window will display the status of the workflow:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Z4zrSF4X--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/yitw9oeb6n6q34to7t1h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Z4zrSF4X--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/yitw9oeb6n6q34to7t1h.png" alt="An active n8n.io workflow writing Bitcoin market price to QuestDB"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can confirm that we are writing data to QuestDB by navigating to &lt;a href="http://localhost:9000/"&gt;http://localhost:9000/&lt;/a&gt;. The &lt;code&gt;btc&lt;/code&gt; table is visible in the top-left &lt;strong&gt;Tables&lt;/strong&gt; panel and we can query incoming requests by simply adding &lt;code&gt;btc&lt;/code&gt; to the query editor and selecting &lt;strong&gt;Run&lt;/strong&gt;. The data will be returned as a table by default, but can easily be graphed by selecting the&lt;br&gt;
&lt;strong&gt;Chart&lt;/strong&gt; button and specifying &lt;code&gt;price&lt;/code&gt; as the series to visualize:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GGpcjNMH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/reztgomy6a3qjvcxkxzl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GGpcjNMH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/reztgomy6a3qjvcxkxzl.png" alt="Time series data returned by QuestDB graphed as a chart"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can create some aggregate queries if we require specific data points or charts. The following SQL query allows for 5 minute aggregates of our incoming BTC pricing data:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="k"&gt;count&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;entries&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;Timestamp&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;avg&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;price&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;btc&lt;/span&gt; &lt;span class="nb"&gt;timestamp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Timestamp&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="n"&gt;SAMPLE&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--t_f_3PBW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/pvjn6pl4lu4bjapjs40d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--t_f_3PBW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/pvjn6pl4lu4bjapjs40d.png" alt="Time series data graphed in QuestDB using five minute aggregates"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Next steps
&lt;/h2&gt;

&lt;p&gt;In this article, we've covered how to get started with n8n.io, a low-code workflow automation platform to query a public REST API, stream data into QuestDB, and build some simple data visualizations with QuestDB's built-in&lt;br&gt;
charting functionality. &lt;/p&gt;

&lt;p&gt;Our example uses minimal information we need from the REST API, so future changes could be to have more fields or currencies being inserted into QuestDB to make more interesting comparisons across multiple tables. We are also using the &lt;strong&gt;cron&lt;/strong&gt; node with an interval of 1 minute, so improvements would be to use a node that can provide much higher rates of ingestion to leverage the performance benefits of QuestDB.&lt;/p&gt;

&lt;p&gt;For inspiration and troubleshooting workflow automations using n8n, take a look at the &lt;a href="https://community.n8n.io/"&gt;n8n community&lt;/a&gt; forum. If you like this content, we'd love to know your thoughts! Feel free to share your feedback or just come and say hello in the &lt;a href="https://dev.to%7B@slackUrl@%7D"&gt;QuestDB Community Slack&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>database</category>
      <category>timeseries</category>
      <category>bitcoin</category>
      <category>lowcode</category>
    </item>
  </channel>
</rss>
