Skip to content

Commit 7d62392

Browse files
authored
upload files for sql bigquery
1 parent a534803 commit 7d62392

File tree

3 files changed

+95
-0
lines changed

3 files changed

+95
-0
lines changed

add_cubes.rtf

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{\rtf1\ansi\ansicpg1252\cocoartf2513
2+
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fnil\fcharset0 Menlo-Regular;}
3+
{\colortbl;\red255\green255\blue255;\red39\green78\blue204;\red255\green255\blue254;\red0\green0\blue0;
4+
\red21\green129\blue62;\red42\green55\blue62;}
5+
{\*\expandedcolortbl;;\cssrgb\c20000\c40392\c83922;\cssrgb\c100000\c100000\c99608;\cssrgb\c0\c0\c0;
6+
\cssrgb\c5098\c56471\c30980;\cssrgb\c21569\c27843\c30980;}
7+
\margl1440\margr1440\vieww10800\viewh8400\viewkind0
8+
\deftab720
9+
\pard\pardeftab720\sl360\partightenfactor0
10+
11+
\f0\fs24 \cf2 \cb3 \expnd0\expndtw0\kerning0
12+
\outl0\strokewidth0 \strokec2 INSERT\cf4 \strokec4 \cf5 \strokec5 `bigcreek.future_mtn.aggcube_data_point`\cf4 \cb1 \strokec4 \
13+
\cf2 \cb3 \strokec2 SELECT\cf4 \strokec4 \cf6 \strokec6 *\cf4 \strokec4 \cf2 \strokec2 except\cf6 \strokec6 (\cf4 \strokec4 int64_field_0\cf6 \strokec6 )\cf4 \strokec4 \cf2 \strokec2 FROM\cf4 \strokec4 \cf5 \strokec5 `future_mtn.tmp-aggcube`\cf4 \strokec4 ;\cb1 \
14+
\
15+
\cf2 \cb3 \strokec2 SELECT\cf4 \strokec4 warmingIdx \cf2 \strokec2 FROM\cf4 \strokec4 \cf5 \strokec5 `bigcreek.future_mtn.aggcube_data_point`\cf4 \strokec4 \cb1 \
16+
\cf2 \cb3 \strokec2 group\cf4 \strokec4 \cf2 \strokec2 by\cf4 \strokec4 warmingIdx;\cb1 \
17+
\
18+
\cf2 \cb3 \strokec2 DROP\cf4 \strokec4 \cf2 \strokec2 TABLE\cf4 \strokec4 \cf5 \strokec5 `future_mtn.tmp-aggcube`\cf4 \strokec4 ;\cb1 \
19+
\
20+
\cf2 \cb3 \strokec2 CREATE\cf4 \strokec4 \cf2 \strokec2 OR\cf4 \strokec4 \cf2 \strokec2 REPLACE\cf4 \strokec4 \cf2 \strokec2 TABLE\cf4 \strokec4 \cf5 \strokec5 `bigcreek.future_mtn.tmp-cube`\cf4 \strokec4 \cf2 \strokec2 as\cf4 \cb1 \strokec4 \
21+
\cf2 \cb3 \strokec2 SELECT\cf4 \strokec4 \cf2 \strokec2 PARSE_DATE\cf6 \strokec6 (\cf5 \strokec5 "%Y-%m-%d"\cf4 \strokec4 , \cf2 \strokec2 date\cf6 \strokec6 )\cf4 \strokec4 \cf2 \strokec2 as\cf4 \strokec4 \cf2 \strokec2 date\cf4 \strokec4 ,\cb1 \
22+
\pard\pardeftab720\sl360\partightenfactor0
23+
\cf6 \cb3 \strokec6 *\cf4 \strokec4 \cf2 \strokec2 except\cf6 \strokec6 (\cf2 \strokec2 date\cf4 \strokec4 , id\cf6 \strokec6 )\cf4 \strokec4 \cb1 \
24+
\pard\pardeftab720\sl360\partightenfactor0
25+
\cf2 \cb3 \strokec2 FROM\cf4 \strokec4 \cf5 \strokec5 `bigcreek.future_mtn.tmp-cube`\cf4 \strokec4 ;\cb1 \
26+
\
27+
\cf2 \cb3 \strokec2 INSERT\cf4 \strokec4 \cf5 \strokec5 `bigcreek.future_mtn.cube_data_point`\cf4 \cb1 \strokec4 \
28+
\cf2 \cb3 \strokec2 SELECT\cf4 \strokec4 \cf6 \strokec6 *\cf4 \strokec4 \cf2 \strokec2 FROM\cf4 \strokec4 \cf5 \strokec5 `future_mtn.tmp-cube`\cf4 \strokec4 ;\cb1 \
29+
\
30+
\cf2 \cb3 \strokec2 SELECT\cf4 \strokec4 warmingIdx \cf2 \strokec2 FROM\cf4 \strokec4 \cf5 \strokec5 `bigcreek.future_mtn.cube_data_point`\cf4 \strokec4 \cb1 \
31+
\cf2 \cb3 \strokec2 group\cf4 \strokec4 \cf2 \strokec2 by\cf4 \strokec4 warmingIdx;\cb1 \
32+
\
33+
\cf2 \cb3 \strokec2 DROP\cf4 \strokec4 \cf2 \strokec2 TABLE\cf4 \strokec4 \cf5 \strokec5 `future_mtn.tmp-cube`\cf4 \strokec4 ;\cb1 \
34+
}

spatial_updates.rtf

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{\rtf1\ansi\ansicpg1252\cocoartf2513
2+
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fnil\fcharset0 Menlo-Regular;}
3+
{\colortbl;\red255\green255\blue255;\red39\green78\blue204;\red255\green255\blue254;\red0\green0\blue0;
4+
\red21\green129\blue62;\red42\green55\blue62;\red238\green57\blue24;}
5+
{\*\expandedcolortbl;;\cssrgb\c20000\c40392\c83922;\cssrgb\c100000\c100000\c99608;\cssrgb\c0\c0\c0;
6+
\cssrgb\c5098\c56471\c30980;\cssrgb\c21569\c27843\c30980;\cssrgb\c95686\c31765\c11765;}
7+
\margl1440\margr1440\vieww10800\viewh8400\viewkind0
8+
\deftab720
9+
\pard\pardeftab720\sl360\partightenfactor0
10+
11+
\f0\fs24 \cf2 \cb3 \expnd0\expndtw0\kerning0
12+
\outl0\strokewidth0 \strokec2 CREATE\cf4 \strokec4 \cf2 \strokec2 OR\cf4 \strokec4 \cf2 \strokec2 REPLACE\cf4 \strokec4 \cf2 \strokec2 TABLE\cf4 \strokec4 \cf5 \strokec5 `future_mtn.tmp-spatial`\cf4 \strokec4 \cf2 \strokec2 as\cf4 \strokec4 \cb1 \
13+
\cf2 \cb3 \strokec2 SELECT\cf4 \strokec4 \cf2 \strokec2 safe_add\cf6 \strokec6 (\cf4 \strokec4 cs_dead_stemc, cs_live_stemc\cf6 \strokec6 )\cf4 \strokec4 \cf2 \strokec2 as\cf4 \strokec4 stemc, cs_leafc, patchID \cf2 \strokec2 as\cf4 \strokec4 patchfamilyIdx, day, month, year, snowpack, burn\cb1 \
14+
\cf2 \cb3 \strokec2 FROM\cf4 \strokec4 \cf5 \strokec5 `future_mtn.tmp-spatial`\cf4 \strokec4 ;\cb1 \
15+
\
16+
\cf2 \cb3 \strokec2 CREATE\cf4 \strokec4 \cf2 \strokec2 OR\cf4 \strokec4 \cf2 \strokec2 REPLACE\cf4 \strokec4 \cf2 \strokec2 TABLE\cf4 \strokec4 \cf5 \strokec5 `future_mtn.tmp-spatial`\cf4 \strokec4 \cf2 \strokec2 as\cf4 \strokec4 \cb1 \
17+
\cf2 \cb3 \strokec2 SELECT\cf4 \strokec4 patchfamilyIdx, \cf2 \strokec2 safe_add\cf6 \strokec6 (\cf4 \strokec4 stemc, cs_leafc\cf6 \strokec6 )\cf4 \strokec4 \cf2 \strokec2 as\cf4 \strokec4 plantc, day, month, year, snowpack, burn\cb1 \
18+
\cf2 \cb3 \strokec2 FROM\cf4 \strokec4 \cf5 \strokec5 `future_mtn.tmp-spatial`\cf4 \strokec4 ;\cb1 \
19+
\
20+
\cf2 \cb3 \strokec2 CREATE\cf4 \strokec4 \cf2 \strokec2 OR\cf4 \strokec4 \cf2 \strokec2 REPLACE\cf4 \strokec4 \cf2 \strokec2 TABLE\cf4 \strokec4 \cf5 \strokec5 `future_mtn.tmp-spatial`\cf4 \strokec4 \cf2 \strokec2 as\cf4 \strokec4 \cb1 \
21+
\cf2 \cb3 \strokec2 SELECT\cf4 \strokec4 \cf2 \strokec2 DATE\cf6 \strokec6 (\cf4 \strokec4 year, month, day\cf6 \strokec6 )\cf4 \strokec4 \cf2 \strokec2 as\cf4 \strokec4 \cf5 \strokec5 `date`\cf4 \strokec4 , plantc, patchfamilyIdx, snowpack, burn \cb1 \
22+
\cf2 \cb3 \strokec2 FROM\cf4 \strokec4 \cf5 \strokec5 `future_mtn.tmp-spatial`\cf4 \strokec4 ; \cb1 \
23+
\
24+
\cf2 \cb3 \strokec2 ALTER\cf4 \strokec4 \cf2 \strokec2 TABLE\cf4 \strokec4 \cf5 \strokec5 `future_mtn.tmp-spatial`\cf4 \cb1 \strokec4 \
25+
\cf2 \cb3 \strokec2 ADD\cf4 \strokec4 \cf2 \strokec2 COLUMN\cf4 \strokec4 warmingIdx INT;\cb1 \
26+
\
27+
\cf2 \cb3 \strokec2 INSERT\cf4 \strokec4 \cf5 \strokec5 `bigcreek.future_mtn.spatial_data_point`\cf4 \strokec4 \cb1 \
28+
\cf2 \cb3 \strokec2 SELECT\cf4 \cb1 \strokec4 \
29+
\pard\pardeftab720\sl360\partightenfactor0
30+
\cf4 \cb3 \cf7 \strokec7 1\cf4 \strokec4 \cf2 \strokec2 AS\cf4 \strokec4 warmingIdx, plantc, patchfamilyIdx, snowpack, burn, \cf2 \strokec2 date\cf4 \strokec4 \cb1 \
31+
\pard\pardeftab720\sl360\partightenfactor0
32+
\cf2 \cb3 \strokec2 FROM\cf4 \cb1 \strokec4 \
33+
\pard\pardeftab720\sl360\partightenfactor0
34+
\cf4 \cb3 \cf5 \strokec5 `future_mtn.tmp-spatial`\cf4 \strokec4 ;\cb1 \
35+
\
36+
\pard\pardeftab720\sl360\partightenfactor0
37+
\cf2 \cb3 \strokec2 SELECT\cf4 \strokec4 warmingIdx \cf2 \strokec2 FROM\cf4 \strokec4 \cf5 \strokec5 `bigcreek.future_mtn.spatial_data_point`\cf4 \strokec4 \cb1 \
38+
\cf2 \cb3 \strokec2 group\cf4 \strokec4 \cf2 \strokec2 by\cf4 \strokec4 warmingIdx;\cb1 \
39+
\
40+
\cf2 \cb3 \strokec2 DROP\cf4 \strokec4 \cf2 \strokec2 TABLE\cf4 \strokec4 \cf5 \strokec5 `future_mtn.tmp-spatial`\cf4 \cb1 \strokec4 \
41+
}

split_spatial_by_warming.rtf

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{\rtf1\ansi\ansicpg1252\cocoartf2513
2+
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fnil\fcharset0 Menlo-Regular;}
3+
{\colortbl;\red255\green255\blue255;\red0\green0\blue0;\red39\green78\blue204;\red255\green255\blue254;
4+
\red21\green129\blue62;\red42\green55\blue62;\red107\green0\blue1;\red238\green57\blue24;}
5+
{\*\expandedcolortbl;;\cssrgb\c0\c0\c0;\cssrgb\c20000\c40392\c83922;\cssrgb\c100000\c100000\c99608;
6+
\cssrgb\c5098\c56471\c30980;\cssrgb\c21569\c27843\c30980;\cssrgb\c50196\c0\c0;\cssrgb\c95686\c31765\c11765;}
7+
\margl1440\margr1440\vieww10800\viewh8400\viewkind0
8+
\deftab720
9+
\pard\pardeftab720\sl360\partightenfactor0
10+
11+
\f0\fs24 \cf2 \expnd0\expndtw0\kerning0
12+
\outl0\strokewidth0 \strokec2 \
13+
\pard\pardeftab720\sl360\partightenfactor0
14+
\cf3 \cb4 \strokec3 CREATE\cf2 \strokec2 \cf3 \strokec3 OR\cf2 \strokec2 \cf3 \strokec3 REPLACE\cf2 \strokec2 \cf3 \strokec3 TABLE\cf2 \strokec2 \cf5 \strokec5 `future_mtn.spatial_cc0`\cf2 \strokec2 \cf3 \strokec3 as\cf2 \strokec2 \cb1 \
15+
\cf3 \cb4 \strokec3 SELECT\cf2 \strokec2 \cf6 \strokec6 *\cf2 \strokec2 \cb1 \
16+
\cf3 \cb4 \strokec3 FROM\cf2 \strokec2 \cf5 \strokec5 `future_mtn.spatial_data_point`\cf2 \strokec2 \cf3 \strokec3 WHERE\cf2 \strokec2 \cb1 \
17+
\pard\pardeftab720\sl360\partightenfactor0
18+
\cf7 \cb4 \strokec7 warmingIdx\cf2 \strokec2 = \cf8 \strokec8 0\cf2 \strokec2 ;\cb1 \
19+
\
20+
}

0 commit comments

Comments
 (0)