-
Notifications
You must be signed in to change notification settings - Fork 13
How to change selected Data Structure (in DB)
Franziska Zander edited this page Mar 8, 2021
·
1 revision
- Important: Do not change or delete directly in the database without a current backup!
Table datasets
- change ID in column datastructureref
Table datasets
- change ID in column datastructureref
- create a new data structure which is identical in the column names, position and data types
Table variables/missingvalues
- Select used missing values for old and new datastructure
SELECT * FROM public.variables LEFT JOIN missingvalues on variables.ID = variableref WHERE datastructureref = '1286'
SELECT * FROM public.variables LEFT JOIN missingvalues on variables.ID = variableref WHERE datastructureref = '1287'
- Compare result, if not equal update table missing values
Table datasets
- change ID in column datastructureref
- delete old data structure
Update Materialized View
- Delete related materialized view
- Click on "sync" under Manage Datasets to create a new view referencing the new variable Ids