DS102 Data Analytics系列课程：SQL应用及HIVE
老师是通过microsoft azure vm 和 hortonwork sandbox set up 的。。。具体步骤ta应该发给大家了
Did you encounter any error message after you run the copy command?
You can implement ‘for loop’ in postgres sql. However it’s not as easy as just write a for loop in a select statement because loops are not part of the SQL language.
You can use this as an example:
First, create a table to hold the results:
create table data.test (result int);
Use DO and a for loop to inserting the results :
declare rec RECORD;
for rec in SELECT column_name
WHERE table_schema = 'data’
AND table_name = ‘items’
insert into data.test select count(rec) from data.items;
Loops is part of control structures (https://www.postgresql.org/docs/current/static/plpgsql-control-structures.html#PLPGSQL-CONTROL-STRUCTURES-LOOPS) and it’s pretty advanced. In my experience, I used more of bash script or python connection to run this.
Hi, please refer to this question on stack overflow:
If you need additional help, please let me know
与 BitTiger Community 的连接断开，我们正在尝试重连，请耐心等待