Skip to content
5. Using TAG Tables

5. Using TAG Tables

TAG tables store measurement histories by repeatedly observed entity name and a time or distance axis. This chapter covers Machbase DBMS 8.7.0 TAG structure, ingestion, queries, metadata, correction, and operations. It validates the deployment and data-model choices from Chapters 3 and 4 through practical SQL.

A tag is an observed entity; a DATA row is one observation. METADATA holds one attribute row per tag, not separate attributes per historical observation. Distinguish original measurements, current attributes, interval aggregates, and ingestion times to interpret results and correction scope consistently.

Chapter Contents

SectionContent
Overview and Selection CriteriaTag identifiers, observation rows, time/distance axes
Table Structure and SchemaColumn order/types, LSL/USL, BINARY, storage design
Create, Alter, and DropBasic DDL, METADATA expansion, object cleanup
Data Ingestion and ChangesAutomatic registration, SQL/Append/file input
Queries and AnalysisRange/latest-value/STAT queries and interpretation
Indexes and PerformanceValidate access paths with actual data
Operations and Data LifecycleDeletion, retention, deduplication completion
Constraints, Errors, and TroubleshootingValid conditions and intentional failure examples
Usage Patterns and ScenariosObservation granularity, units, missing-data models
TAG MetadataRegistration, queries, changes, deletion, JSON, ARRAY
TAG Data UPDATE and CorrectionDirect correction, NULL correction, audit history
tagmetaimport and Bulk Metadata RegistrationCSV setup, input targets, rerun errors

Exercises and Support Scope

Each page is an independent exercise. If a setup table exists, determine whether it belongs to another workload; do not delete it arbitrarily. Run success examples separately from intentional failures. Apply cleanup SQL only to objects created for that exercise.

TAG DATA UPDATE is Standard Edition only. Check Edition-specific scope for duplicate-check intervals, METADATA ALTER, and individual LSL/USL operations. SQL INSERT, Append responses, storage-buffer flush, and index/statistics completion are different events.

Chapter 6 covers full ROLLUP creation, query, and rebuild procedures. This chapter addresses only how TAG corrections and deletions relate to aggregates.

Last updated on