[FLaNK] Smart Weather Applications with Flink SQL
[FLaNK] Smart Weather Applications with Flink SQL
Sometimes you want to acquire, route, transform, live query and analyze all the weather data in the United States while those reports happen. With FLaNK, it's a trivial process to do.
Reference:
https://www.datainmotion.dev/2020/07/ingesting-all-weather-data-with-apache.html
Source:
Build
https://github.com/tspannhw/ApacheConAtHome2020/blob/main/scripts/setup.sh
Query
https://github.com/tspannhw/ApacheConAtHome2020/blob/main/scripts/flink.sh
SQL
INSERT INTO weathernj | |
SELECT `location`, station_id,latitude,longitude,observation_time,weather, | |
temperature_string, temp_f,temp_c,relative_humidity,wind_string,wind_dir,wind_degrees,wind_mph, | |
wind_kt, pressure_in,dewpoint_string,dewpoint_f,dewpoint_c | |
FROM weather | |
WHERE | |
`location` is not null and `location` <> 'null' and trim(`location`) <> '' and `location` like '%NJ'; |
Kafka Insert
https://github.com/tspannhw/ApacheConAtHome2020/blob/main/flinksql/weathernj.sql
Schemas
https://github.com/tspannhw/ApacheConAtHome2020/blob/main/schemas/weathernj.avsc
https://github.com/tspannhw/ApacheConAtHome2020/blob/main/schemas/weather.avsc
Example Slack Output