Skip to content

Nodes Meta CSV-Get

Extract CSV from node metadata at a specific metadata key path. CSV metadata is often used for tariff schedules in SolarNode, such as tariff schedule expressions.

Usage

s10k nodes meta csv-get [-mode=<displayMode>] -node=<nodeId>
                        [-path=<metadataPath>]

Options

Option Long Version Description
-node= --node-id= the node ID to get metadata from
-path= --path= the key path with the CSV data to extract
-mode= --display-mode= the format to display the data as, one of CSV, JSON, or PRETTY; defaults to PRETTY

Output

The CSV data, formatted according to the --display-mode option.

Examples

Show CSV data in the default formatting:

s10k nodes meta csv-get --node-id 101 --path /pm/cpd/schedule
+-----------------+-----+---------+------+-----------------+
|           Month | Day | Weekday | Time | cpdPeriodActive |
+-----------------+-----+---------+------+-----------------+
| Jan-Apr,Oct-Dec |     |         |      |               0 |
+-----------------+-----+---------+------+-----------------+
|         May-Sep |     |         |      |               1 |
+-----------------+-----+---------+------+-----------------+

The same data can be output as CSV as well:

s10k nodes meta csv-get --node-id 101 --path /pm/cpd/schedule \
     --display-mode CSV
Month,Day,Weekday,Time,cpdPeriodActive
"Jan-Apr,Oct-Dec",,,,0
May-Sep,,,,1

The same data can be output as JSON as well:

s10k nodes meta csv-get --node-id 101 --path /pm/cpd/schedule \
     --display-mode JSON
[
  [ "Month", "Day", "Weekday", "Time", "cpdPeriodActive" ],
  [ "Jan-Apr,Oct-Dec", null, null, null, "0" ],
  [ "May-Sep", null, null, null, "1" ]
]