Created
March 23, 2021 04:45
-
-
Save robrich/e2b9073694b56e2fcd91e7cef5872904 to your computer and use it in GitHub Desktop.
SingleStore to AWS S3
This file contains hidden or 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 IF NOT EXISTS acme; | |
USE acme; | |
CREATE TABLE IF NOT EXISTS messages ( | |
id BIGINT AUTO_INCREMENT PRIMARY KEY, | |
content varchar(300) NOT NULL, | |
createdate TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP | |
); | |
INSERT INTO messages ( | |
content | |
) VALUES ( | |
'hello from SingleStore' | |
); | |
SELECT id, content, createdate | |
FROM messages | |
INTO S3 'bucket-name/messages.csv' | |
CONFIG '{"region":"us-east-1"}' | |
CREDENTIALS '{"aws_access_key_id":"YOUR_KEY","aws_secret_access_key":"YOUR_SECRET"}'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment