Created
April 30, 2020 22:14
-
-
Save carlsverre/137a164531af4497d7d3fcc016e879bc to your computer and use it in GitHub Desktop.
MemSQL Telco Customer Churn Dataset
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
DROP DATABASE IF EXISTS churn_example; | |
CREATE DATABASE churn_example; | |
USE churn_example; | |
CREATE TABLE telco_customer_churn | |
( | |
customerID TEXT, | |
gender TEXT, | |
SeniorCitizen BOOLEAN, | |
Partner TEXT, | |
Dependents TEXT, | |
tenure INT, | |
PhoneService TEXT, | |
MultipleLines TEXT, | |
InternetService TEXT, | |
OnlineSecurity TEXT, | |
OnlineBackup TEXT, | |
DeviceProtection TEXT, | |
TechSupport TEXT, | |
StreamingTV TEXT, | |
StreamingMovies TEXT, | |
Contract TEXT, | |
PaperlessBilling TEXT, | |
PaymentMethod TEXT, | |
MonthlyCharges DECIMAL(13, 4), | |
TotalCharges DECIMAL(13, 4), | |
Churn TEXT, | |
PRIMARY KEY (customerID) | |
); | |
CREATE or REPLACE PIPELINE `telco_customer_churn` AS | |
LOAD DATA S3 'download.memsql.com/first-time/WA_Fn-UseC_-Telco-Customer-Churn.csv' | |
CONFIG '{"region": "us-east-1"}' | |
SKIP DUPLICATE KEY ERRORS | |
INTO TABLE `telco_customer_churn` | |
FIELDS | |
TERMINATED BY ',' | |
OPTIONALLY ENCLOSED BY '"' | |
IGNORE 1 LINES; | |
START PIPELINE `telco_customer_churn` FOREGROUND; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment