First time with Crate? Learn how to install it on Windows systems, run the Admin UI and execute your first query.
System requirements
Windows 7/8/10 versions are supported.
To launch Crate on Windows, you will need a
Java JDK (version 8u111+) installed.
Set the JAVA_HOME
environment variable:
JAVA_HOME
.Notice Click the image below to go through all the steps.
Specify the Crate ports through the Windows Firewall:
4200
, 4300
, and then
click Next.Crate
and click Finish.Notice Click the image below to go through all the steps.
Download the Crate Tarball, expand it and move to a convenient location.
Start Crate by running .\bin\crate.
Notice: To create a cluster, run the command multiple times.
Crate ships with an Admin UI that provides an overview of your cluster, nodes, tables and much more.
To connect to Crate cluster, insert the following url to your address bar:
http://127.0.0.1:4200/admin
(where 127.0.0.1
is a SERVER_IP
, the publicly accessible
IP address of any node in the Crate cluster, and 4200
is
the Crate port).
In the Admin UI, go to the Get Started tab and proceed with the instructions. As a result you will get a tweets table with the latest posts imported from Twitter. It is accessible in the Tables tab.
Notice Click the image below to go through all the steps.
Now, lets make some queries.
Go to the Console tab and type:
SELECT text FROM tweets LIMIT 100;
Click Execute query.
If the query was written correctly, the operation will be successful, and the SELECT OK message will be displayed. The resulting table will be displayed in the field below.
Notice Click the image below to go through all the steps.
Lets try another example. Here you will get a total number of obtained tweets as well as the number of users that were verified.
In the Console tab, type:
SELECT count(*) AS quantity,
user['verified']
FROM tweets
GROUP BY user['verified']
ORDER BY quantity DESC;
Click Execute query.
Notice Click the image below to go through all the steps.
This query counts the number of verified and non-verified twitter users and displays the quantity by each type. count(*) is an aggregation function that returns a count of all the rows that match the query. The GROUP BY clause groups each count result into the two possible values of user['verified'] (true and false).
Now you are ready to proceed with Crate. Good luck!