"Mysql/hive/redis"의 두 판 사이의 차이
ph
2번째 줄: | 2번째 줄: | ||
ALTER TABLE table_name RENAME TO new_table_name; | ALTER TABLE table_name RENAME TO new_table_name; | ||
[https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-RenameTable] | [https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-RenameTable] | ||
− | |||
+ | =Mysql= | ||
==Create user== | ==Create user== | ||
CREATE USER 'newuser'@'localhost' IDENTIFIED BY ‘password'; | CREATE USER 'newuser'@'localhost' IDENTIFIED BY ‘password'; | ||
11번째 줄: | 11번째 줄: | ||
DROP USER ‘demo’@‘localhost’; | DROP USER ‘demo’@‘localhost’; | ||
[https://www.digitalocean.com/community/tutorials/how-to-create-a-new-user-and-grant-permissions-in-mysql] | [https://www.digitalocean.com/community/tutorials/how-to-create-a-new-user-and-grant-permissions-in-mysql] | ||
− | |||
− | == | + | =HIVE= |
+ | ==view partitions== | ||
+ | show partitions table; | ||
+ | http://stackoverflow.com/q/15616290/766330 | ||
+ | |||
+ | 특정 partition만을 대상으로 조회하는 특별한 쿼리는 없다. 파티션 정보를 where에 넣으면 hive가 자동으로 알아서 하는 것으로 보임. ref. [http://stackoverflow.com/q/11700127/766330 how to select data from hive with specific partition?] |
2017년 4월 19일 (수) 11:44 판
Rename table
ALTER TABLE table_name RENAME TO new_table_name;
Mysql
Create user
CREATE USER 'newuser'@'localhost' IDENTIFIED BY ‘password'; GRANT ALL PRIVILEGES ON * . * TO 'newuser'@‘localhost'; FLUSH PRIVILEGES;
DROP USER ‘demo’@‘localhost’;
HIVE
view partitions
show partitions table;
http://stackoverflow.com/q/15616290/766330
특정 partition만을 대상으로 조회하는 특별한 쿼리는 없다. 파티션 정보를 where에 넣으면 hive가 자동으로 알아서 하는 것으로 보임. ref. how to select data from hive with specific partition?