UDM team maintains a carefully curated metadata structures for each value we store in our databases. Each value stored in the database belongs to one, and only one Series. Each Series has one and only one Unit. Examples of units are “€/100kg“, “MT“, or “Canadian dollars to One U.S. Dollar“.
The data catalog endpoint with the full list of all Units is /UDM_Catalog_Units. The fields are:
- UnitID (int, not null)
- UnitName (nvarchar(200), not null)
- UnitDescription (nvarchar(50), not null)
- LastModified (datetime2(6), not null)
- Active (bit, not null)
UnitID is the unique identifying number assigned to each unit, i.e. the primary key for the table where this data resides. UnitName is the symbolic label used to describe the value. e.g. “¢/bu“. UnitDescription is the verbose description of the symbols used in the UnitName. In this example: “Cents per bushel“. The feed UDM_Catalog_Units contains the timestamp field LastModified which can be used to facilitate incremental pulls. No record is ever hard-deleted from the underlying UDM database table. Instead, soft-deleted records have Active field set to 0. Soft-delete principle in conjunction with the timestamp of last change allows the users to optimize their data pulls by only requesting those fields that have been modified since the last time the data feed was pulled. For example, the request to the server may be:
or more simply:
To add this table to your database:
CREATE TABLE [Report].[Catalog.Units]( [UnitID] [int] NOT NULL, [UnitName] [nvarchar](400) NOT NULL, [UnitDescription] [nvarchar](200) NULL, [LastModified] DATETIME2(6) NOT NULL, [Active] BIT NOT NULL, CONSTRAINT [PK_Catalog.Units] PRIMARY KEY ([UnitID]) ) GO
See related Knowledge Base articles: