How to Get Started with ClickHouse

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
The quickest way to get started  with ClickHouse is to go to the   Quick Start in the documentation and copy  and paste that clever curl command which   downloads a single binary that can be used  to run all sorts of tools with ClickHouse. I'm going to use it to run the ClickHouse server.  The first time you run it, it's going to create   some files and folders in the current directory  like the config files and the data store folders   and all those other useful things it needs  once we have it up and running in a different   tab I'm going to go back to this folder and  run the same binary to run clickhouse-client   and when you see the little smiley face prompt  that means you're connected to ClickHouse. The first thing I want to do is show you how  cool it is that ClickHouse can just read files   from where they sit so I have a zipped up  tab separated file sitting on S3 that has   some New York City Taxi data in it you see that  when I run the command to describe that file   click house infers the data types of the columns  if I want I can query the data as it sits in S3 I   don't have to bring it into ClickHouse yet so  here I'm running a simple query to figure out   the average price per passenger count of these  New York City Taxi rides and you can see here   it processed a million rows in 24 seconds but  most of that time was streaming the data into   ClickHouse so let's create a table in ClickHouse  to store that data now you can see here I'm using   some ClickHouse data types like uint32 and  float32 and low cardinality strengths and   notice the table engine is merge tree every table  in ClickHouse has to have an engine when it's time   to store the data in ClickHouse you're going to  want to store it into a merge tree table engine   and now I'm going to run this insert command this  is going to stream the data from S3 into my table   notice there's something clever here I did the  curly braces with the 0.2 that's three files   it's trips underscore zero trips underscore  one and trips underscore two and I could have   used an asterisk for a wild card also now that  that's done let's see how many rows we inserted   I'll do a quick select count from trips and it's  just over 3 million rows so here I'll run the same   query that we ran before except this time it'll  run on the data that's in the merge tree table in   ClickHouse and notice instead of taking 24 seconds  it took .024 seconds so 24 milliseconds obviously   that's considerably faster for more details on the  examples and the queries that I just executed look   for the New York Taxi data under the example  data set section of the documentation and now   that you have ClickHouse up and running you're  ready to put in your own data and get started
Info
Channel: ClickHouse
Views: 222
Rating: undefined out of 5
Keywords: ClickHouse, get started, tutorial
Id: 6mmQUOmA-T0
Channel Id: undefined
Length: 2min 58sec (178 seconds)
Published: Tue Sep 05 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.