Case Scenario: Maintenance (Snapshots and Meta Data Listing)¶
Snapshots¶
List Snapshots¶
The list snapshot command is used to list all the snapshots of the dataset. This will help determine how many dataset snapshots you have. The command is as follows:
Command
Example
Output
INFO[0000] π get snapshots...
INFO[0000] π get snapshots...completed
SNAPSHOTID | TIMESTAMP
----------------------|----------------
5724215526433994041 | 1660579675496
7521925172258223419 | 1660745070207
The first column represents the Snapshot IDs and the second one represents the respective timestamp
Set Snapshot¶
The Set Snapshot command helps to set a snapshot so that you can travel back. The command is given below.
Command
Example
Letβs say you wanna revert back to a specific snapshot ID from the once listed by the list snapshots command. The command will be:
Output (successful execution)
(Make sure that all the operations have been committed, else there will be errors)
Metadata Listing¶
List Metadata¶
The metadata command lists all the metadata files. The command is given below.
Command
Example
Output (successful execution)
INFO[0000] π get metadata...
INFO[0000] π get metadata...completed
VERSION | TIMESTAMP
-----------------------|----------------
v34.gz.metadata.json | 1661252152036
v30.gz.metadata.json | 1661249266230
v4.gz.metadata.json | 1661163612098
v17.gz.metadata.json | 1661242729511
v37.metadata.json | 1661253371394
v43.gz.metadata.json | 1661254272987
Set Metadata¶
In order to set the metadata to the latest or some specific version, use the below command.
Command
ExampleIn order to set the metadata of the dataset dataos://icebase:retail/city
to the latest
format.
In order to set the metadata to some specfic version among the ones in the list say v4.gz.metadata.json
.
Output
Mark Column Nullable¶
To set nullability in a specific column. The command is as follows:
Letβs say we wanna set a column random as nullable. The command is given below:
Output (on successful execution)
The column is now set as nullable.