Skip to content

Instantly share code, notes, and snippets.

@dgadiraju
Created April 15, 2019 22:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dgadiraju/366a8d80f255bde49a598ba56fa63455 to your computer and use it in GitHub Desktop.
Save dgadiraju/366a8d80f255bde49a598ba56fa63455 to your computer and use it in GitHub Desktop.
CREATE DATABASE retail_db;
USE retail_db;
CREATE EXTERNAL TABLE orders (
order_id INT,
order_date STRING,
order_customer_id INT,
order_status STRING
) ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
LOCATION '/public/retail_db/orders';
SELECT * FROM orders LIMIT 10;
SELECT count(1) FROM orders;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment