Created
April 15, 2019 22:49
-
-
Save dgadiraju/366a8d80f255bde49a598ba56fa63455 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE DATABASE retail_db; | |
USE retail_db; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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