22 lines
786 B
SQL
22 lines
786 B
SQL
MODEL (
|
|
name raw.psd_data,
|
|
kind FULL,
|
|
start '2006-08-01',
|
|
cron '@daily' -- This cron determines how often SQLMesh checks for new data.
|
|
);
|
|
|
|
SELECT
|
|
Commodity_Code::VARCHAR as commodity_code,
|
|
Commodity_Description::VARCHAR as commodity_description,
|
|
Country_Code::VARCHAR as country_code,
|
|
Country_Name::VARCHAR as country_name,
|
|
Market_Year::BIGINT as market_year,
|
|
Calendar_Year::BIGINT as calendar_year,
|
|
Month::VARCHAR as month,
|
|
Attribute_ID::VARCHAR as attribute_id,
|
|
Attribute_Description::VARCHAR as attribute_description,
|
|
Unit_ID::VARCHAR as unit_id,
|
|
Unit_Description::VARCHAR as unit_description,
|
|
Value::DOUBLE as value,
|
|
FROM read_csv_auto('zip:///home/deeman/projects/materia/extract/psdonline/src/psdonline/data/**/*.zip/*.csv', header=true, union_by_name=true)
|