Ticket #1499: MemFill.sh

File MemFill.sh, 1.2 KB (added by anasiri, 8 years ago)

Creates the test-data

Line 
1#!/bin/bash
2
3# Clean old data
4# rasql --user rasadmin --passwd rasadmin --quiet --query "drop collection MemTestData"
5# rasdl --delsettype MemTestSet
6# rasdl --delmddtype MemTests
7# rasdl --delmddtype MemTest
8
9# Insert types
10# rasql --user rasadmin --passwd rasadmin --quiet --query "create type MemTest as unsigned short mdarray[x,y]"
11# rasql --user rasadmin --passwd rasadmin --quiet --query "create type MemTests as unsigned short mdarray[year(0:*), month(1:12), day(1:31), hour(0:23), minute(0:59), row, col]"
12# rasql --user rasadmin --passwd rasadmin --quiet --query "create type MemTestSet as set(MemTests)"
13# rasql --user rasadmin --passwd rasadmin --quiet --query "create collection MemTestData MemTestSet"
14# rasql --user rasadmin --passwd rasadmin --quiet --query "insert into MemTestData values marray it in [0:0,1:1,1:1,0:0,0:0,0:0,0:0] values 0us"
15
16day=1
17while [ $day -le 31 ]
18do
19 hour=0
20 while [ $hour -le 23 ]
21 do
22 echo Update data for day=$day hour=$hour
23 rasql --user rasadmin --passwd rasadmin --quiet --query "update MemTestData as c set c[2016, 12, $day, $hour, 00, *:*, *:*] assign marray x in [0:899, 0:899] values 4711us"
24 let hour=$hour+1
25 done
26 let day=$day+1
27done
28