testing sqlmesh
This commit is contained in:
7
transform/sqlmesh_materia/models/raw/raw_psd_data.sql
Normal file
7
transform/sqlmesh_materia/models/raw/raw_psd_data.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
MODEL (
|
||||
name raw.psd_data,
|
||||
kind SEED (
|
||||
path '../../../../extract/psdonline/src/psdonline/data/**/*.csv'
|
||||
),
|
||||
cron '@daily',
|
||||
);
|
||||
21
transform/sqlmesh_materia/schema.yml
Normal file
21
transform/sqlmesh_materia/schema.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
model:
|
||||
name: raw.raw_psd_alldata # schema.table_name format
|
||||
kind: EXTERNAL # This is the key part!
|
||||
path: ../../../../extract/psdonline/src/psdonline/data/**/*.zip # Path relative to the project root
|
||||
format: csv # Specify the file format
|
||||
dialect: duckdb # The dialect that will read this file
|
||||
options:
|
||||
auto_detect: true
|
||||
columns:
|
||||
commodity_code: string
|
||||
commodity_description: string
|
||||
country_code: string
|
||||
country_name: string
|
||||
market_year: int
|
||||
calendar_year: int
|
||||
month: int
|
||||
attribute_id: string
|
||||
attribute_description: string
|
||||
unit_id: string
|
||||
unit_description: string
|
||||
value: float
|
||||
Reference in New Issue
Block a user