CLI - Command Line Interface

Run the below command to view the cfxDX help

help
Use arrows to move up/down with history of previous inputs
q Quit
tag Set the tag to query
tags List all available tags
datefmt Date format. Examples are %Y-%m-%d for date only, or %Y-%m-%d %H:%M:%S for date and time
data Query the data for the specified tag and optional CFXQL Query
count Count the rows in the data for the specified tag and optional CFXQL Query
meta Query the metadata for the specified tag
limit Max rows to query. Specify 0 to retrieve all rows
page Page size. Number of rows for each page during paginated queries.
browse Show the last dataframe into default browser. Can use also use 'br'.
viz Visuaize dataframe using CFX DFViz tool.
eval Evaluate specified command. Previous data/meta output is preserved as variable 'df'

Interactive Command Line Usage Examples

Select the tag which locates a specific Dataset

tag asset-db:assetLCMMaster

Limit number of rows returned overall (limit 0 means unlimited)

limit 5000

Limit page size for each page. Default is 200

page 1000

Query subset of rows using CFXQL

data Equipment_Type is 'CHASSIS'

To redirect the output to a CSV file

data Equipment_Type is 'CHASSIS' --> /tmp/chassis_list.csv

To redirect all rows to a file

data --> /tmp/alll_assets.csv

To explore the last downloaded dataframe

eval df['Equipment_Type'].unique()

To see the metadata for current tag

meta

To view the primary keys for current tag

meta PrimaryKey is 'Yes'

To save the metadata to a file

meta --> /tmp/assets_meta.csv