Examples
This section contains Jupyter notebook and Python script examples demonstrating how to use the NI Data Store.
All example notebooks are located in the examples/notebooks/ directory of the repository.
Each example script has its own project folder under examples/.
OData Query Example Notebooks
These notebooks demonstrate how to query data and metadata using OData syntax:
Setup and Sample Data:
publish_sample_data.ipynb - Creates comprehensive sample data for query examples
Query Examples:
query_metadata.ipynb - Demonstrates metadata queries (operators, hardware, UUTs, etc.)
query_measurements.ipynb - Demonstrates measurement and condition queries
Other Example Notebooks
Additional examples for various use cases:
publish_measurement.ipynb - Basic measurement publishing
alias.ipynb - Working with aliases
extension_attributes.ipynb - Extension attributes examples
publish_waveforms.ipynb - Publishing waveform data
Getting Started with Notebooks
Run the setup notebook first: Start with
publish_sample_data.ipynbto create sample dataExplore queries: Try the OData query examples to learn filtering and data retrieval
Adapt for your use case: Use the other examples as templates for your specific needs
All notebooks include detailed explanations and can be run in any Jupyter environment with the ni.datastore package installed.
Python Example Scripts
These Python scripts demonstrate how to publish and query both data and metadata.
overview.py - Publishing and querying measurement data
system.py - Publishing and querying system metadata
Each has a README.md file that describes its runtime requirements and usage.