Skip to content

Commit

Permalink
update home fact shema
Browse files Browse the repository at this point in the history
  • Loading branch information
eslamdyab21 committed Jan 5, 2025
1 parent 9a04e52 commit 65f7aff
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions notebooks/wh_facts_dimensions_iceberg_tables.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -912,17 +912,15 @@
"%%sql\n",
"\n",
"CREATE TABLE SolarX_WH.fact_solar_panel_power_readings(\n",
" solar_panel_reading_key INT NOT NULL,\n",
" solar_panel_key SMALLINT NOT NULL, -- REFERENCES dim_solar_panel(solar_panel_key)\n",
" date_key TIMESTAMP NOT NULL, -- REFERENCES dim_date(date_key)\n",
"\n",
" solar_panel_reading_id VARCHAR(25) NOT NULL,\n",
" 15_minutes_interval SMALLINT NOT NULL,\n",
" \n",
" solar_panel_id INT NOT NULL,\n",
" generation_power_wh FLOAT NOT NULL \n",
")\n",
"\n",
"USING iceberg\n",
"PARTITIONED BY (MONTH(date_key), 15_minutes_interval)"
"PARTITIONED BY (MONTH(date_key), solar_panel_id)"
]
},
{
Expand Down

0 comments on commit 65f7aff

Please sign in to comment.