Snowflake-Labs / sfquickstarts

Follow along with our tutorials to get you up and running with the Snowflake Data Cloud.
Apache License 2.0
295 stars 559 forks source link

Knoema DataSet Problem: Data-centric Approach to Machine Learning Using Snowflake and Amazon SageMaker Data Wrangler #432

Open snlipp opened 1 year ago

snlipp commented 1 year ago

Followed Chapter 4:

1) Pulled "Knoema - Labor Data Atlas" from Snowflake Marketplace

2) Renamed the database to KNOEMA_LABOR_DATA_ATLAS KNOEMA_LABOR_DATA_ATLAS

But it seems KNOEMA_LABOR_DATA_ATLAS has changed: View/Object LABOR.BLSLA vanished. Was it replaced with LABOR.BLSOE2021?

There therefore below SQL Query in Quickstart fails:

_CREATE OR REPLACE VIEW KNOEMA_EMPLOYMENT_DATA AS (

SELECT *

FROM (SELECT "Measure Name" MeasureName, "Date", "RegionId" State, AVG("Value") Value FROM "KNOEMA_LABOR_DATA_ATLAS"."LABOR"."BLSLA" WHERE "RegionId" is not null and "Date" >= '2018-01-01' AND "Date" < '2018-12-31' GROUP BY "RegionId", "Measure Name", "Date")

    PIVOT(AVG(Value) FOR MeasureName IN ('civilian noninstitutional population', 'employment', 'employment-population ratio', 'labor force', 'labor force participation rate', 'unemployment', 'unemployment rate'))

     AS p (Date, State, civilian_noninstitutional_population, employment, employment_population_ratio, labor_force, labor_force_participation_rate, unemployment, unemployment_rate)

)_

Please sort out change and correct Quickstart

Bildschirmfoto 2022-11-23 um 18 36 53
jdanielmyers commented 1 year ago

@andriesengelbrecht please take a look, thank you!

sfc-gh-aengelbrecht commented 1 year ago

Unfortunately it seems this KNOEMA dataset may not be available in all regions. I will put parquet files and DDL in a Google drive for a workaround.