ETL

Data Catalog: International Trade – Commodity Description and Coding Systems

247 views July 8, 2019 July 8, 2019 admin 0

Most countries have adopted Harmonized Commodity Description and Coding System as the system for organizing their trade data. However, this is not the only system for organizing the trade data. For example, in the United States, USDA Economic Research Service maintains FATUS – Foreign Agricultural Trade of the Unitd States; USDA Foreign Agricultural Service maintains BICO – Bulk, Intermediate and Consumer-Oriented: Groupings of the Harmonized Tariff Exports and Import Codes. In the European Union, EU Comission uses Combined Nomenclature. In New Zelanad, the name of the system is New Zealand Harmonized System Classification, etc. The full list of trade data systems in our database is given in the data feed UDM_Catalog_Special_International_Trade_Commodity_Description_and_Coding_Systems.

To add this table to your database:

CREATE TABLE [UDM].[Catalog.Special.International Trade.Commodity Description and Coding Systems]( 
	[CommodityCodingSystemID] [int] NOT NULL,
	[CommodityCodingSystemCountryID] [int] NOT NULL,
	[CommodityCodingSystemName] [nvarchar](200) NOT NULL,
	[CommodityCodingSystemDescription] [nvarchar](800) NOT NULL,
	[LastModified] [datetime] NOT NULL,
	[Active] [bit] NOT NULL,
 CONSTRAINT [PK_UDM.Catalog.Special.International Trade.Commodity Description and Coding Systems] PRIMARY KEY CLUSTERED 
(
	[CommodityCodingSystemID] ASC
)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO 

ALTER TABLE [Report].[Catalog.Special.International Trade.Commodity Description and Coding Systems]  ADD  CONSTRAINT [FK_Report.Catalog.Special.International Trade.Commodity Description and Coding Systems.CommodityCodingSystemCountryID] FOREIGN KEY([CommodityCodingSystemCountryID])
REFERENCES [Report].[Catalog.Areas] ([AreaID])
GO

Description of fields:

  • CommodityCodingSystemID: Primary Key. Used as foreign key in all other trade-related catalog tables.
  • CommodityCodingSystemCountryID: For a country-specific system this field corresponds to the ID for that country, as given in [Report].[Catalog.Areas], For the Harmonized Commodity Description and Coding System the CommodityCodingSystemCountryID is set to 99, which corresponds to World.
  • CommodityCodingSystemName: Formal name of the commodity coding system.
  • CommodityCodingSystemDescription: The description of the commodity coding system.
  • LastModified: Timestamp that can be used for incremental pulls.
  • Active: Soft-delete flag. Active = false for soft-deleted records.

To pull the data from this feed for the first time:

https://data.commoditymarkets.com/Universal/UDM_Catalog_Special_International_Trade_Commodity_Description_and_Coding_Systems?$format=json

To pull only data inserted, updated or soft-deleted since 2019-06-30 at 23:50 Central U.S. Time:

https://data.commoditymarkets.com/Universal/UDM_Catalog_Special_International_Trade_Commodity_Description_and_Coding_Systems?$format=json&$filter=LastModified%20gt%202019-06-30T23:50:00Z

Was this helpful?