File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,41 @@ can be displayed by `kcidb-schema`.
77
77
78
78
To cleanup the dataset (remove the tables) use ` kcidb-cleanup ` .
79
79
80
+ Upgrading
81
+ ---------
82
+
83
+ To upgrade the dataset schema, do the following.
84
+
85
+ 1 . Authenticate to Google Cloud with the key file (` ~/.kernelci-bq.json `
86
+ here):
87
+
88
+ gcloud auth activate-service-account --key-file ~/.kernelci-bq.json
89
+
90
+ or login with your credentials (entered via a browser window):
91
+
92
+ gcloud auth login
93
+
94
+ 2 . Create a new dataset (` kernelci02 ` in project ` kernelci ` here) with the new
95
+ schema:
96
+
97
+ bq mk --project_id=kernelci kernelci02
98
+ # Using new-schema kcidb
99
+ kcidb-init -d kernelci02
100
+
101
+ 3 . Switch all data submitters to using new-schema kcidb and the newly-created
102
+ dataset.
103
+
104
+ 4 . Disable write access to the old dataset using BigQuery management console.
105
+
106
+ 5 . Transfer data from the old dataset (named ` kernelci01 ` here) to the new
107
+ dataset (named ` kernelci02 ` here) using old-schema ` kcidb-query ` and
108
+ new-schema ` kcidb-submit ` .
109
+
110
+ # Using old-schema kcidb
111
+ kcidb-query -d kernelci01 > kernelci01.json
112
+ # Using new-schema kcidb
113
+ kcidb-submit -d kernelci02 < kernelci01.json
114
+
80
115
API
81
116
---
82
117
You can use the ` kcidb ` module to do everything the command-line tools do.
You can’t perform that action at this time.
0 commit comments