"Mysql/hive/redis"의 두 판 사이의 차이
ph
								
												
				| 1번째 줄: | 1번째 줄: | ||
| − | ==Rename table== | + | ===Rename table=== | 
|   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= | + | ==Mysql== | 
| − | ==Create user== | + | ===Create user=== | 
|   CREATE USER 'newuser'@'localhost' IDENTIFIED BY ‘password'; |   CREATE USER 'newuser'@'localhost' IDENTIFIED BY ‘password'; | ||
|   GRANT ALL PRIVILEGES ON * . * TO 'newuser'@‘localhost'; |   GRANT ALL PRIVILEGES ON * . * TO 'newuser'@‘localhost'; | ||
| 12번째 줄: | 12번째 줄: | ||
| [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= | + | ==HIVE== | 
| − | ==view partitions== | + | ===view partitions=== | 
|   show partitions table; |   show partitions table; | ||
| http://stackoverflow.com/q/15616290/766330 | 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?] | 특정 partition만을 대상으로 조회하는 특별한 쿼리는 없다. 파티션 정보를 where에 넣으면 hive가 자동으로 알아서 하는 것으로 보임. ref. [http://stackoverflow.com/q/11700127/766330 how to select data from hive with specific partition?] | ||
2017년 4월 19일 (수) 11:48 판
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?