Using Input Forms with SQL Queries – Apache Zeppelin

Apache Zeppelin is a fantastic open source web-based software that allows users to build and share great looking data visualizations using various languages, including SQL. Apache Zeppelin allows dynamic creation of text input forms in your notebooks. Input forms can be created and referenced using a simple template language. For example, using ${variable_name} in a

read more

Connecting Apache Zeppelin to MySQL

zeppelin-mysql-graph

Apache Zeppelin is a fantastic open source web-based notebook. Zeppelin allows users to build and share great looking data visualizations using languages such as Scala, Python, SQL, etc. A common back end for Zeppelin in MySQL. Here are the steps needed to connect Zeppelin a remote MySQL database: Download the MySQL Connector The first thing

read more

SELECT N Percent of Records in MySQL

The ability to select a certain percentage of records from a query or database table can be important when working with lots of data. Luckily this is easy to do in MySQL with the RAND() function and a WHERE clause. RAND() returns a random floating point number between 0 and 1, making it easy to

read more

How to Select a Random Sample of Records in MySQL

The ability to select a random sample of records from query or database table can be important when working with lots of data. Luckily this is easy to do in MySQL with the RAND() function and a WHERE clause. RAND() returns a random floating point value between 0 and 1, making it very easy to

read more

How to Select Random Records in MySQL

The ability to select random records from a table in MySQL can be helpful. Luckily this is easy to do with the RAND() function. RAND() returns a random floating point value between 0 and 1. You can select random records in MySQL by using the RAND() function together with ORDER and LIMIT clauses. Here is

read more

Writing to a Database from Spark

One of the great features of Spark is the variety of data sources it can read from and write to. If you already have a database to write to, connecting to that database and writing data from Spark is fairly simple. This example shows how to write to database that supports JDBC connections. Databases Supporting

read more

Loading Data from a Database into Spark

One of the great features of Spark is the variety of data sources it can read from. Loading data from a database into Spark using JDBC requires 3 major steps. First you need a running database that support JDBC connections. Next you will need to download and use the JDBC driver of that database. Finally

read more

How to Load Text Files into MySQL

MySQL databases are often populated by loading text files directly into tables. MySQL makes this very easy to do with the LOAD DATA INFILE statements. For example:

LOAD DATA INFILE Statements LOAD DATA INFILE statements can read data into MySQL tables at very high speeds. This will be much faster than running many single

read more

Execute MySQL Scripts on the Command Line

When working with MySQL it is often necessary to execute SQL statements or scripts programmatically from the command line. SQL statements can be included in a SQL script (text) file and executed by the MySQL Client. This can be done in a few different ways. Execute MySQL Script File from Standard Input Statements in a

read more