BlazingDB

The BlazingDB Developer Hub

Welcome to the BlazingDB developer hub.

BlazingDB is a SQL database on graphics processing units (GPUs). This allows us to process tons of data very fast. If you want to know a little more check out our "Announcements" section.

You'll find comprehensive guides and documentation to help you start working with BlazingDB as quickly as possible, as well as support if you get stuck.

Get Started    

Cloud Quickstart Guide

Enterprise Cloud Cluster Edition v1.0

If you don't know what BlazingDB is, please check out our first post, Introducing BlazingDB 1.0. The short of it, we're a high perormance SQL database on video graphics cards (GPUs).

Here we are going to show how to use the BlazingDB Workbench ("Workbench").

This is a home-built workbench, and is automatically included with BlazingDB.

Login to the BlazingDB Workbench

Assuming a BlazingDB team member, or you yourself, already created a new user you will need to login to the Workbench.

BlazingDB Workbench - Login Page

BlazingDB Workbench - Login Page

Create a New Database

To start working with BlazingDB, you will need to create a database first.

Create a Database

Create a Database

After creating the database, you will need to select the database to start creating your tables and loading data.

Select the New Database

Select the New Database

Create a New Environment

Environments are needed in order to operate with the db.

Create a New Environment

Create a New Environment

Select the new environment created by clicking on the name of the folder, under Blazing Environments. After selecting it, it will be painted in blue.

Selected the New Environment

Selected the New Environment

When running queries, if you have not selected an environment you will not receive an error, but the query will still not run.

To create a table, you need to run this statement:

CREATE TABLE my_table (field1 string(50), field2 date, field3 long, field4 double)

Be Careful

You need to check to have selected a folder/environment or your query will not run and will not present any error.

Create a SQL File to Run Queries

Create a new file, if you give it a ".sql" extension it will syntax highlight your SQL code.

Create a New File

Create a New File

And start writing out your SQL. If you simply highlight a single (and complete) SQL statement while having a database selected you can submit that query.

Merely highlight the query you wish to run and then click CTRL + ENTER

Create a New Table

So here we have a create table statement in our editor. We're simply going to highlight and submit it to BlazingDB.

Run a Single Query

Run a Single Query

If you don't have selected a database you will receive this error:

Results:

You need to select a database before running a query.

create table my_table (field1 string(8), field2 double, field3 long, field4 date)

If your table was created successfully, you will receive this message:

Results:

message
created table my_table

Query ran in 0.ms
Rows: 0. Speed: 0. rows / sec

If your query has any error, you will receive an error.

create table my_table3 (field1 string, field2 double, field3 long, field4 date)

Results:

message
Problem found near field1 string columns allowed are long, double, date, and string(size)

Query ran in 0.ms
Rows: 0. Speed: 0. rows / sec

To see the data types, please visit Blazing DB Data Types & Operators

Load Data into a Table

To load data into your tables, there are different options.

  • Indicate the path where you file is to load the data into BlazingDB.
  • Upload a csv, txt, .dat, .sql, .tbl file with the data by the graphic tool.
  • Copy your data into a file you create inside a Blazing Environment.
-- To Load Your Data from your path without having to upload the file

load data infile '/my_path/nutrition.csv' into table mytable fields terminated by ',' enclosed by '"' lines terminated by '\n'

-- To Load Your Data without a file

load data stream 'field1 data|field2 data|field3 data' into table mytable fields terminated by ',' enclosed by '"' lines terminated by '\n'

Remember

You need to have selected your environment (in blue) and your database (in white).

Upload your files in the following option of the menu:

upload a file button

upload a file button

By clicking on "Select Files" you can choose different files for upload.

select files

select files

Useful to know

1) You can select more than one file at the same time.

2) Our upload tool is a "chunk uploader". So you can interrupt an upload, refresh the application, select the same files, and it will pick off where it left off (in most cases).

After selecting the files, you just need to click on "Upload files".

upload files

upload files

When you finish and the bar is painted in green, you can click "Done uploading" or select new files and repeat the process.

files uploaded

files uploaded

Now, you can load this file data into your tables.

load data infile nutrition.csv into table mytable fields terminated by ',' enclosed by '"' lines terminated by '\n'

Syntax Load data from file into table:

load data infile [file_name.csv]  into table [table_name] fields terminated by '[delimiter]' enclosed by '"' lines terminated by '\n'

Useful Statements

List tables is used to show the tables existent inside the database.

list tables

Describe tables is used to show the table structure with the fields and data types of each field.

describe table my_table

Cloud Quickstart Guide

Enterprise Cloud Cluster Edition v1.0