...
Once this is done, then add the change-set for yang resource you have created to load the data into the DB.
Note | ||
---|---|---|
| ||
To load this data into the local DB directly from the csv, you will need to remove the record added as part of the API executed above. Because of the FK constraint between the yang_resource and the schema_set_yang_resource table, the newly created record in the schema_set_yang_resource table which maps both the schema_set and yang_resource tables will have to be removed first. |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
- changeSet: author: cps label: dmi-registry-schema-preload id: 9.7 loadUpdateData: encoding: UTF-8 file: 'changelog/db/changes/data/dmi/yang_resource@2021-12-13.csv' onlyUpdate: 'false' primaryKey: 'id' quotchar: '"' separator: '|' tableName: 'yang_resource' columns: - column: header: name name: name type: STRING - column: header: content name: content type: STRING - column: header: checksum name: checksum type: STRING rollback: - sql: sql: delete from yang_resource where name = 'dmi-registry@2021-12-13.yang' |
...