Skip to content

Case Scenario: Table Properties

List Properties

To obtain the list of properties, execute the following command within the DataOS.

Command

dataos-ctl dataset properties -a ${{udl}}

Example

dataos-ctl dataset properties -a dataos://icebase:retail/city

Output (Successful Execution)

INFO[0000] πŸ“‚ get properties...                          
INFO[0000] πŸ“‚ get properties...completed                 

           PROPERTY NAME           | PROPERTY VALUE  
-----------------------------------|-----------------
  write.metadata.compression-codec | gzip

Above, we can see the pre-defined property write.metadata.compression-codec whose value is gzip

Add Properties

To add a single property the below code can be used.

Command

dataos-ctl dataset add-properties -a ${{udl}} \
-p "${{property-name}}:${{property-value}}"

To add multiple properties at the same time, use:

dataos-ctl dataset add-properties -a dataos://icebase:retail/city \
-p "${{property-name}}:${{property-value}}" \
-p "${{property-name}}:${{property-value}}"

Example

Let’s say we want to add a new property by the name write.metadata.metrics.default and set its value to full. To do this, execute the following code:

dataos-ctl dataset add-properties -a dataos://icebase:retail/city \
-p write.metadata.metrics.default:full

Output (on successful execution)

INFO[0000] πŸ“‚ add properties...                          
INFO[0000] πŸ“‚ add properties...completed

To check whether the property is added or not, run the list properties command:

dataos-ctl dataset properties -a dataos://icebase:retail/city

Output

INFO[0000] πŸ“‚ get properties...                          
INFO[0000] πŸ“‚ get properties...completed                 

           PROPERTY NAME           | PROPERTY VALUE  
-----------------------------------|-----------------
  write.metadata.metrics.default   | full            
  write.metadata.compression-codec | gzip

As we can see, the property has been successfully added.

Remove Properties

To remove a property, the following command can be used.

Command

dataos-ctl dataset remove-properties -a ${{udl}} \
-p "${{property-name}}" \
-p "${{property-name}}"

Example

Let’s say we want to remove the property write.metadata.metrics.default. To accomplish this, execute the following code:

dataos-ctl dataset remove-properties -a dataos://icebase:retail/city \
-p write.metadata.metrics.default

Output (successful execution)

INFO[0000] πŸ“‚ remove properties...                       
INFO[0001] πŸ“‚ remove properties...completed

To check whether the property is deleted or not, use the list properties command.

dataos-ctl dataset properties -a dataos://icebase:retail/city
INFO[0000] πŸ“‚ get properties...                          
INFO[0000] πŸ“‚ get properties...completed                 

           PROPERTY NAME           | PROPERTY VALUE  
-----------------------------------|-----------------
  write.metadata.compression-codec | gzip

As can be observed, the property is successfully deleted.