SlideShare ist ein Scribd-Unternehmen logo
1 von 10
Downloaden Sie, um offline zu lesen
1
Weather Scraper
Get weather Information for your data warehouse and reporting/analytical needs.
Create SQL Table to Store the Weather Information:
CREATE TABLE [dbo].[Weather](
[ID] [int] IDENTITY(1,1) NOT NULL,
[InsertDate] [varchar](255) NULL,
[ZipCode] [varchar](255) NULL,
[CityID] [varchar](255) NULL,
[CityName] [varchar](255) NULL,
[CoordLong] [varchar](255) NULL,
[CoordLat] [varchar](255) NULL,
[Country] [varchar](255) NULL,
[SunriseStart] [varchar](255) NULL,
[SunriseSet] [varchar](255) NULL,
[TemperatureAvg] [varchar](255) NULL,
[TemperatureMin] [varchar](255) NULL,
[TemperatureMax] [varchar](255) NULL,
[TemperatureUnit] [varchar](255) NULL,
[HumidityValue] [varchar](255) NULL,
[HumidityUnit] [varchar](255) NULL,
[PressureValue] [varchar](255) NULL,
[PressureUnit] [varchar](255) NULL,
[WindSpeedValue] [varchar](255) NULL,
[WindSpeedName] [varchar](255) NULL,
[WindDirectionValue] [varchar](255) NULL,
[WindDirectionCode] [varchar](255) NULL,
[WindDirectionName] [varchar](255) NULL,
[CloudValue] [varchar](255) NULL,
[CloudName] [varchar](255) NULL,
[PrecipitationMode] [varchar](255) NULL,
[WeatherNumber] [varchar](255) NULL,
[WeatherValue] [varchar](255) NULL,
[WeatherIcon] [varchar](255) NULL,
[LastUpdateValue] [varchar](255) NULL,
PRIMARY KEY CLUSTERED
(
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF,
ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
After Table is created, we will use the http://api.openweathermap.org RESTful API to access and store
the Weather Information.
You can see sample weather information returned from query by accessing this link:
http://api.openweathermap.org/data/2.5/weather?q=55441&mode=xml
2
SSIS Package
The package is very simple.
1. Get List all all the ZipCodes
2. Loop through each ZipCode and Get Current Weather Information For.
Details:
3
SELECT DISTINCT [ZipCode] FROM [dbo].[ZipCodes] order by ZipCode Desc
4
Store Results in Variable.
Loop through each Individual ZipCode in the ForEachLoop Container.
5
Map the Individual Zip Codes to a ZipCode Variable.
6
Pass the “loaded” ZipCode variable in the ForEachLoop container to the script task so as to pull the
weather information for particular ZipCode.
7
Edit the Script Task. To see the Code:
This is the Key:
 Build your URL using the ZipCode in order to get the result
 I specify USA in the string to return only US results. There is much documentation on the
openweathermap website on how to search for specific data.
 http://api.openweathermap.org/API#search_city
var url = @"http://api.openweathermap.org/data/2.5/weather?q="+ZipCode+",USA&mode=xml";
The two methods in my implementation are the main() method and the SaveWeatherData()
8
MainMethod builds URL, makes call to API, and parses out the resulting XML.
SaveWeatherData Method, is called by main method. It takes parameter values and persist them in the
database table.
9
Each time the Script tasked is call, the weather data for that ZipCode be returned and inserted into your
table.
The execution looks like this.
Your Results should look like this.
10
Now, you have detailed weather information with date and zip codes at your disposal. You can tie this
with location information in your database or data warehouse to do extensive querying. E.g.
 How does rain affect my sales by region
 How does humidity affect sales
 How does cloud cover affect sales
 How does weather affect tips
 How does weather affect Employee productivity
The job can be scheduled to run hourly, daily, weekly or whatever frequency you want.
The sky (pun intended) is virtually the limit on this.
Good Luck.
About: Fru Louis is a developer, blogger and all around technology
enthusiasts. Fru is also a contributor and principal of the BIWizzard blog. He writes and stays
abreast with the latest innovative ideas, news, and trends. Have a tip, comment or critic? Email
him at fru.louis.gmail.com.

Weitere ähnliche Inhalte

Was ist angesagt?

SQL Count(*) VS Count(1)
SQL Count(*) VS Count(1)SQL Count(*) VS Count(1)
SQL Count(*) VS Count(1)Rainmaker Ho
 
뱅크샐러드 파이썬맛 레시피
뱅크샐러드 파이썬맛 레시피뱅크샐러드 파이썬맛 레시피
뱅크샐러드 파이썬맛 레시피겨울 정
 
Do something in 5 with gas 7-email log
Do something in 5 with gas 7-email logDo something in 5 with gas 7-email log
Do something in 5 with gas 7-email logBruce McPherson
 
Raw system logs processing with hive
Raw system logs processing with hiveRaw system logs processing with hive
Raw system logs processing with hiveArpit Patil
 
DataStructure Concepts-HEAP,HASH,Graph
DataStructure Concepts-HEAP,HASH,GraphDataStructure Concepts-HEAP,HASH,Graph
DataStructure Concepts-HEAP,HASH,GraphDurgadevi palani
 
SequoiaDB Distributed Relational Database
SequoiaDB Distributed Relational DatabaseSequoiaDB Distributed Relational Database
SequoiaDB Distributed Relational Databasewangzhonnew
 
Pumps, Compressors and Turbine Fault Frequency Analysis
Pumps, Compressors and Turbine Fault Frequency AnalysisPumps, Compressors and Turbine Fault Frequency Analysis
Pumps, Compressors and Turbine Fault Frequency AnalysisUniversity of Illinois,Chicago
 
Pumps, Compressors and Turbine Fault Frequency Analysis
Pumps, Compressors and Turbine Fault Frequency AnalysisPumps, Compressors and Turbine Fault Frequency Analysis
Pumps, Compressors and Turbine Fault Frequency AnalysisUniversity of Illinois,Chicago
 
Exploring Modeling - Doing More with Lists
Exploring Modeling - Doing More with ListsExploring Modeling - Doing More with Lists
Exploring Modeling - Doing More with ListsRonen Botzer
 
Sql server ___________session_20(ddl triggers)
Sql server  ___________session_20(ddl triggers)Sql server  ___________session_20(ddl triggers)
Sql server ___________session_20(ddl triggers)Ehtisham Ali
 
GeoSpatially enabling your Spark and Accumulo clusters with LocationTech
GeoSpatially enabling your Spark and Accumulo clusters with LocationTechGeoSpatially enabling your Spark and Accumulo clusters with LocationTech
GeoSpatially enabling your Spark and Accumulo clusters with LocationTechRob Emanuele
 
Air Pollution in Nova Scotia: Analysis and Predictions
Air Pollution in Nova Scotia: Analysis and PredictionsAir Pollution in Nova Scotia: Analysis and Predictions
Air Pollution in Nova Scotia: Analysis and PredictionsCarlo Carandang
 
Processing Geospatial Data At Scale @locationtech
Processing Geospatial Data At Scale @locationtechProcessing Geospatial Data At Scale @locationtech
Processing Geospatial Data At Scale @locationtechRob Emanuele
 
Q4 2016 GeoTrellis Presentation
Q4 2016 GeoTrellis PresentationQ4 2016 GeoTrellis Presentation
Q4 2016 GeoTrellis PresentationRob Emanuele
 
Internship_Presentation
Internship_PresentationInternship_Presentation
Internship_PresentationSourabh Gujar
 
FOSDEM 2015: Distributed Tile Processing with GeoTrellis and Spark
FOSDEM 2015: Distributed Tile Processing with GeoTrellis and SparkFOSDEM 2015: Distributed Tile Processing with GeoTrellis and Spark
FOSDEM 2015: Distributed Tile Processing with GeoTrellis and SparkRob Emanuele
 

Was ist angesagt? (20)

SQL Count(*) VS Count(1)
SQL Count(*) VS Count(1)SQL Count(*) VS Count(1)
SQL Count(*) VS Count(1)
 
뱅크샐러드 파이썬맛 레시피
뱅크샐러드 파이썬맛 레시피뱅크샐러드 파이썬맛 레시피
뱅크샐러드 파이썬맛 레시피
 
Do something in 5 with gas 7-email log
Do something in 5 with gas 7-email logDo something in 5 with gas 7-email log
Do something in 5 with gas 7-email log
 
Raw system logs processing with hive
Raw system logs processing with hiveRaw system logs processing with hive
Raw system logs processing with hive
 
DataStructure Concepts-HEAP,HASH,Graph
DataStructure Concepts-HEAP,HASH,GraphDataStructure Concepts-HEAP,HASH,Graph
DataStructure Concepts-HEAP,HASH,Graph
 
KMI System
KMI SystemKMI System
KMI System
 
SequoiaDB Distributed Relational Database
SequoiaDB Distributed Relational DatabaseSequoiaDB Distributed Relational Database
SequoiaDB Distributed Relational Database
 
Pumps, Compressors and Turbine Fault Frequency Analysis
Pumps, Compressors and Turbine Fault Frequency AnalysisPumps, Compressors and Turbine Fault Frequency Analysis
Pumps, Compressors and Turbine Fault Frequency Analysis
 
Pumps, Compressors and Turbine Fault Frequency Analysis
Pumps, Compressors and Turbine Fault Frequency AnalysisPumps, Compressors and Turbine Fault Frequency Analysis
Pumps, Compressors and Turbine Fault Frequency Analysis
 
Exploring Modeling - Doing More with Lists
Exploring Modeling - Doing More with ListsExploring Modeling - Doing More with Lists
Exploring Modeling - Doing More with Lists
 
Q&a
Q&aQ&a
Q&a
 
Sql server ___________session_20(ddl triggers)
Sql server  ___________session_20(ddl triggers)Sql server  ___________session_20(ddl triggers)
Sql server ___________session_20(ddl triggers)
 
GeoSpatially enabling your Spark and Accumulo clusters with LocationTech
GeoSpatially enabling your Spark and Accumulo clusters with LocationTechGeoSpatially enabling your Spark and Accumulo clusters with LocationTech
GeoSpatially enabling your Spark and Accumulo clusters with LocationTech
 
Air Pollution in Nova Scotia: Analysis and Predictions
Air Pollution in Nova Scotia: Analysis and PredictionsAir Pollution in Nova Scotia: Analysis and Predictions
Air Pollution in Nova Scotia: Analysis and Predictions
 
Raster package jacob
Raster package jacobRaster package jacob
Raster package jacob
 
library(sparkline)
library(sparkline)library(sparkline)
library(sparkline)
 
Processing Geospatial Data At Scale @locationtech
Processing Geospatial Data At Scale @locationtechProcessing Geospatial Data At Scale @locationtech
Processing Geospatial Data At Scale @locationtech
 
Q4 2016 GeoTrellis Presentation
Q4 2016 GeoTrellis PresentationQ4 2016 GeoTrellis Presentation
Q4 2016 GeoTrellis Presentation
 
Internship_Presentation
Internship_PresentationInternship_Presentation
Internship_Presentation
 
FOSDEM 2015: Distributed Tile Processing with GeoTrellis and Spark
FOSDEM 2015: Distributed Tile Processing with GeoTrellis and SparkFOSDEM 2015: Distributed Tile Processing with GeoTrellis and Spark
FOSDEM 2015: Distributed Tile Processing with GeoTrellis and Spark
 

Andere mochten auch

Finding business value in Big Data
Finding business value in Big DataFinding business value in Big Data
Finding business value in Big DataJames Serra
 
Benefits of the Azure cloud
Benefits of the Azure cloudBenefits of the Azure cloud
Benefits of the Azure cloudJames Serra
 
Introducing Azure SQL Data Warehouse
Introducing Azure SQL Data WarehouseIntroducing Azure SQL Data Warehouse
Introducing Azure SQL Data WarehouseJames Serra
 
Introducing DocumentDB
Introducing DocumentDB Introducing DocumentDB
Introducing DocumentDB James Serra
 
Choosing technologies for a big data solution in the cloud
Choosing technologies for a big data solution in the cloudChoosing technologies for a big data solution in the cloud
Choosing technologies for a big data solution in the cloudJames Serra
 
Building a Big Data Solution
Building a Big Data SolutionBuilding a Big Data Solution
Building a Big Data SolutionJames Serra
 
Microsoft cloud big data strategy
Microsoft cloud big data strategyMicrosoft cloud big data strategy
Microsoft cloud big data strategyJames Serra
 
Big data architectures and the data lake
Big data architectures and the data lakeBig data architectures and the data lake
Big data architectures and the data lakeJames Serra
 
Introduction to PolyBase
Introduction to PolyBaseIntroduction to PolyBase
Introduction to PolyBaseJames Serra
 
Building an Effective Data Warehouse Architecture
Building an Effective Data Warehouse ArchitectureBuilding an Effective Data Warehouse Architecture
Building an Effective Data Warehouse ArchitectureJames Serra
 

Andere mochten auch (10)

Finding business value in Big Data
Finding business value in Big DataFinding business value in Big Data
Finding business value in Big Data
 
Benefits of the Azure cloud
Benefits of the Azure cloudBenefits of the Azure cloud
Benefits of the Azure cloud
 
Introducing Azure SQL Data Warehouse
Introducing Azure SQL Data WarehouseIntroducing Azure SQL Data Warehouse
Introducing Azure SQL Data Warehouse
 
Introducing DocumentDB
Introducing DocumentDB Introducing DocumentDB
Introducing DocumentDB
 
Choosing technologies for a big data solution in the cloud
Choosing technologies for a big data solution in the cloudChoosing technologies for a big data solution in the cloud
Choosing technologies for a big data solution in the cloud
 
Building a Big Data Solution
Building a Big Data SolutionBuilding a Big Data Solution
Building a Big Data Solution
 
Microsoft cloud big data strategy
Microsoft cloud big data strategyMicrosoft cloud big data strategy
Microsoft cloud big data strategy
 
Big data architectures and the data lake
Big data architectures and the data lakeBig data architectures and the data lake
Big data architectures and the data lake
 
Introduction to PolyBase
Introduction to PolyBaseIntroduction to PolyBase
Introduction to PolyBase
 
Building an Effective Data Warehouse Architecture
Building an Effective Data Warehouse ArchitectureBuilding an Effective Data Warehouse Architecture
Building an Effective Data Warehouse Architecture
 

Ähnlich wie Weather scraper for your data warehouse

Date dimension table - part II
Date dimension table - part IIDate dimension table - part II
Date dimension table - part IIDirk Cludts
 
Interactive Session on Sparkling Water
Interactive Session on Sparkling WaterInteractive Session on Sparkling Water
Interactive Session on Sparkling WaterSri Ambati
 
Data Access Mobile Devices
Data Access Mobile DevicesData Access Mobile Devices
Data Access Mobile Devicesvenkat987
 
Data Warehouse and Business Intelligence - Recipe 4 - Staging area - how to v...
Data Warehouse and Business Intelligence - Recipe 4 - Staging area - how to v...Data Warehouse and Business Intelligence - Recipe 4 - Staging area - how to v...
Data Warehouse and Business Intelligence - Recipe 4 - Staging area - how to v...Massimo Cenci
 
Polyglot ClickHouse -- ClickHouse SF Meetup Sept 10
Polyglot ClickHouse -- ClickHouse SF Meetup Sept 10Polyglot ClickHouse -- ClickHouse SF Meetup Sept 10
Polyglot ClickHouse -- ClickHouse SF Meetup Sept 10Altinity Ltd
 
JKJ_T SQL project code samples
JKJ_T SQL project code samplesJKJ_T SQL project code samples
JKJ_T SQL project code samplesJeff Jacob
 
Predictive Analytics with Airflow and PySpark
Predictive Analytics with Airflow and PySparkPredictive Analytics with Airflow and PySpark
Predictive Analytics with Airflow and PySparkRussell Jurney
 
Sparkling Water Meetup
Sparkling Water MeetupSparkling Water Meetup
Sparkling Water MeetupSri Ambati
 
Using Spark to Load Oracle Data into Cassandra
Using Spark to Load Oracle Data into CassandraUsing Spark to Load Oracle Data into Cassandra
Using Spark to Load Oracle Data into CassandraJim Hatcher
 
Using Spark to Load Oracle Data into Cassandra (Jim Hatcher, IHS Markit) | C*...
Using Spark to Load Oracle Data into Cassandra (Jim Hatcher, IHS Markit) | C*...Using Spark to Load Oracle Data into Cassandra (Jim Hatcher, IHS Markit) | C*...
Using Spark to Load Oracle Data into Cassandra (Jim Hatcher, IHS Markit) | C*...DataStax
 
Introduction to SQLite in Adobe AIR
Introduction to SQLite in Adobe AIRIntroduction to SQLite in Adobe AIR
Introduction to SQLite in Adobe AIRPeter Elst
 
Please fix the java code (using eclipse)package hw4p1;import jav.pdf
Please fix the java code (using eclipse)package hw4p1;import jav.pdfPlease fix the java code (using eclipse)package hw4p1;import jav.pdf
Please fix the java code (using eclipse)package hw4p1;import jav.pdfinfo961251
 
A Century Of Weather Data - Midwest.io
A Century Of Weather Data - Midwest.ioA Century Of Weather Data - Midwest.io
A Century Of Weather Data - Midwest.ioRandall Hunt
 
Advanced .NET Data Access with Dapper
Advanced .NET Data Access with Dapper Advanced .NET Data Access with Dapper
Advanced .NET Data Access with Dapper David Paquette
 
All Things Open 2016 -- Database Programming for Newbies
All Things Open 2016 -- Database Programming for NewbiesAll Things Open 2016 -- Database Programming for Newbies
All Things Open 2016 -- Database Programming for NewbiesDave Stokes
 
Analyzing Air Quality Measurements in Macedonia with Apache Drill
Analyzing Air Quality Measurements in Macedonia with Apache DrillAnalyzing Air Quality Measurements in Macedonia with Apache Drill
Analyzing Air Quality Measurements in Macedonia with Apache DrillMarjan Sterjev
 
Avro, la puissance du binaire, la souplesse du JSON
Avro, la puissance du binaire, la souplesse du JSONAvro, la puissance du binaire, la souplesse du JSON
Avro, la puissance du binaire, la souplesse du JSONAlexandre Victoor
 
Bridging Structured and Unstructred Data with Apache Hadoop and Vertica
Bridging Structured and Unstructred Data with Apache Hadoop and VerticaBridging Structured and Unstructred Data with Apache Hadoop and Vertica
Bridging Structured and Unstructred Data with Apache Hadoop and VerticaSteve Watt
 

Ähnlich wie Weather scraper for your data warehouse (20)

Date dimension table - part II
Date dimension table - part IIDate dimension table - part II
Date dimension table - part II
 
Do You Have the Time
Do You Have the TimeDo You Have the Time
Do You Have the Time
 
Interactive Session on Sparkling Water
Interactive Session on Sparkling WaterInteractive Session on Sparkling Water
Interactive Session on Sparkling Water
 
Data Access Mobile Devices
Data Access Mobile DevicesData Access Mobile Devices
Data Access Mobile Devices
 
Data Warehouse and Business Intelligence - Recipe 4 - Staging area - how to v...
Data Warehouse and Business Intelligence - Recipe 4 - Staging area - how to v...Data Warehouse and Business Intelligence - Recipe 4 - Staging area - how to v...
Data Warehouse and Business Intelligence - Recipe 4 - Staging area - how to v...
 
Polyglot ClickHouse -- ClickHouse SF Meetup Sept 10
Polyglot ClickHouse -- ClickHouse SF Meetup Sept 10Polyglot ClickHouse -- ClickHouse SF Meetup Sept 10
Polyglot ClickHouse -- ClickHouse SF Meetup Sept 10
 
JKJ_T SQL project code samples
JKJ_T SQL project code samplesJKJ_T SQL project code samples
JKJ_T SQL project code samples
 
Predictive Analytics with Airflow and PySpark
Predictive Analytics with Airflow and PySparkPredictive Analytics with Airflow and PySpark
Predictive Analytics with Airflow and PySpark
 
Sparkling Water Meetup
Sparkling Water MeetupSparkling Water Meetup
Sparkling Water Meetup
 
Using Spark to Load Oracle Data into Cassandra
Using Spark to Load Oracle Data into CassandraUsing Spark to Load Oracle Data into Cassandra
Using Spark to Load Oracle Data into Cassandra
 
Using Spark to Load Oracle Data into Cassandra (Jim Hatcher, IHS Markit) | C*...
Using Spark to Load Oracle Data into Cassandra (Jim Hatcher, IHS Markit) | C*...Using Spark to Load Oracle Data into Cassandra (Jim Hatcher, IHS Markit) | C*...
Using Spark to Load Oracle Data into Cassandra (Jim Hatcher, IHS Markit) | C*...
 
Introduction to SQLite in Adobe AIR
Introduction to SQLite in Adobe AIRIntroduction to SQLite in Adobe AIR
Introduction to SQLite in Adobe AIR
 
Please fix the java code (using eclipse)package hw4p1;import jav.pdf
Please fix the java code (using eclipse)package hw4p1;import jav.pdfPlease fix the java code (using eclipse)package hw4p1;import jav.pdf
Please fix the java code (using eclipse)package hw4p1;import jav.pdf
 
A Century Of Weather Data - Midwest.io
A Century Of Weather Data - Midwest.ioA Century Of Weather Data - Midwest.io
A Century Of Weather Data - Midwest.io
 
Advanced .NET Data Access with Dapper
Advanced .NET Data Access with Dapper Advanced .NET Data Access with Dapper
Advanced .NET Data Access with Dapper
 
All Things Open 2016 -- Database Programming for Newbies
All Things Open 2016 -- Database Programming for NewbiesAll Things Open 2016 -- Database Programming for Newbies
All Things Open 2016 -- Database Programming for Newbies
 
Analyzing Air Quality Measurements in Macedonia with Apache Drill
Analyzing Air Quality Measurements in Macedonia with Apache DrillAnalyzing Air Quality Measurements in Macedonia with Apache Drill
Analyzing Air Quality Measurements in Macedonia with Apache Drill
 
CakePHP
CakePHPCakePHP
CakePHP
 
Avro, la puissance du binaire, la souplesse du JSON
Avro, la puissance du binaire, la souplesse du JSONAvro, la puissance du binaire, la souplesse du JSON
Avro, la puissance du binaire, la souplesse du JSON
 
Bridging Structured and Unstructred Data with Apache Hadoop and Vertica
Bridging Structured and Unstructred Data with Apache Hadoop and VerticaBridging Structured and Unstructred Data with Apache Hadoop and Vertica
Bridging Structured and Unstructred Data with Apache Hadoop and Vertica
 

Mehr von Fru Louis

TPC Benchmarking Explained: Transaction Processing Performance Council | fr...
TPC Benchmarking Explained: Transaction Processing Performance Council   | fr...TPC Benchmarking Explained: Transaction Processing Performance Council   | fr...
TPC Benchmarking Explained: Transaction Processing Performance Council | fr...Fru Louis
 
SAP Advanced Lecture | FruTech.io
SAP Advanced Lecture | FruTech.ioSAP Advanced Lecture | FruTech.io
SAP Advanced Lecture | FruTech.ioFru Louis
 
Fru 2022 | Tech Trends, Themes, Thoughts, Perspectives and Predictions
Fru 2022 | Tech Trends, Themes, Thoughts, Perspectives and PredictionsFru 2022 | Tech Trends, Themes, Thoughts, Perspectives and Predictions
Fru 2022 | Tech Trends, Themes, Thoughts, Perspectives and PredictionsFru Louis
 
10 Top Newsworthy Tech Industry Headlines Of 2020 | Other Than COVID
10 Top Newsworthy Tech Industry Headlines Of 2020 | Other Than COVID10 Top Newsworthy Tech Industry Headlines Of 2020 | Other Than COVID
10 Top Newsworthy Tech Industry Headlines Of 2020 | Other Than COVIDFru Louis
 
10 Tech Conferences to Attend in 2021
10 Tech Conferences to Attend in 202110 Tech Conferences to Attend in 2021
10 Tech Conferences to Attend in 2021Fru Louis
 
10 Jobs in Tech that DON'T require you to CODE
10 Jobs in Tech that DON'T require you to CODE10 Jobs in Tech that DON'T require you to CODE
10 Jobs in Tech that DON'T require you to CODEFru Louis
 
10 Brilliant ‘Tech’ Gifts for Remote Workers | 2021
10 Brilliant ‘Tech’ Gifts for Remote Workers |  2021 10 Brilliant ‘Tech’ Gifts for Remote Workers |  2021
10 Brilliant ‘Tech’ Gifts for Remote Workers | 2021 Fru Louis
 
10 Most Used AWS Services To LEARN For A Career Boost
10 Most Used AWS Services To LEARN For A Career Boost10 Most Used AWS Services To LEARN For A Career Boost
10 Most Used AWS Services To LEARN For A Career BoostFru Louis
 
10 Soft Skills Every Tech Professional Must Master For Career Success
10 Soft Skills Every Tech Professional Must Master For Career Success10 Soft Skills Every Tech Professional Must Master For Career Success
10 Soft Skills Every Tech Professional Must Master For Career SuccessFru Louis
 
10 Basic Skills Needed For Entry Level I.T. Jobs
10 Basic Skills Needed For Entry Level I.T. Jobs10 Basic Skills Needed For Entry Level I.T. Jobs
10 Basic Skills Needed For Entry Level I.T. JobsFru Louis
 
10 Beginner Settings to Look At with Snowflake Web UI
10 Beginner Settings to Look At with Snowflake Web UI10 Beginner Settings to Look At with Snowflake Web UI
10 Beginner Settings to Look At with Snowflake Web UIFru Louis
 
10 Smart Questions To Ask Hiring Managers In A Job Interview
10 Smart Questions To Ask Hiring Managers In A Job Interview10 Smart Questions To Ask Hiring Managers In A Job Interview
10 Smart Questions To Ask Hiring Managers In A Job InterviewFru Louis
 
10 Non-Tech Degrees That Will Help You With a Career In I.T.
10 Non-Tech Degrees That Will Help You With a Career In I.T. 10 Non-Tech Degrees That Will Help You With a Career In I.T.
10 Non-Tech Degrees That Will Help You With a Career In I.T. Fru Louis
 
10 Amazing Benefits and Advantages of Online Degrees
10 Amazing Benefits and Advantages of Online Degrees10 Amazing Benefits and Advantages of Online Degrees
10 Amazing Benefits and Advantages of Online DegreesFru Louis
 
10 Concepts EVERY Self-Taught Tech Professionals Should Know
10 Concepts EVERY Self-Taught Tech Professionals Should Know10 Concepts EVERY Self-Taught Tech Professionals Should Know
10 Concepts EVERY Self-Taught Tech Professionals Should KnowFru Louis
 
10 Acronyms Every TECH Professional Should Know | 2021
10 Acronyms Every TECH Professional Should Know | 202110 Acronyms Every TECH Professional Should Know | 2021
10 Acronyms Every TECH Professional Should Know | 2021Fru Louis
 
10 Brilliant ‘Tech’ Gifts for Remote Workers | 2021
10 Brilliant ‘Tech’ Gifts for Remote Workers |  2021 10 Brilliant ‘Tech’ Gifts for Remote Workers |  2021
10 Brilliant ‘Tech’ Gifts for Remote Workers | 2021 Fru Louis
 
10 Tech Essentials Your Home Office Needs | Work From Home | WFH | 2021
10 Tech Essentials Your Home Office Needs | Work From Home | WFH | 202110 Tech Essentials Your Home Office Needs | Work From Home | WFH | 2021
10 Tech Essentials Your Home Office Needs | Work From Home | WFH | 2021Fru Louis
 
10 Data Science, Machine Learning & AI Projects You Can Try Today
10 Data Science, Machine Learning & AI Projects You Can Try Today10 Data Science, Machine Learning & AI Projects You Can Try Today
10 Data Science, Machine Learning & AI Projects You Can Try TodayFru Louis
 
10 Things Every Tech Employee Must Do Right After You Land Your Dream Job
10 Things Every Tech Employee Must Do Right After You Land Your Dream Job10 Things Every Tech Employee Must Do Right After You Land Your Dream Job
10 Things Every Tech Employee Must Do Right After You Land Your Dream JobFru Louis
 

Mehr von Fru Louis (20)

TPC Benchmarking Explained: Transaction Processing Performance Council | fr...
TPC Benchmarking Explained: Transaction Processing Performance Council   | fr...TPC Benchmarking Explained: Transaction Processing Performance Council   | fr...
TPC Benchmarking Explained: Transaction Processing Performance Council | fr...
 
SAP Advanced Lecture | FruTech.io
SAP Advanced Lecture | FruTech.ioSAP Advanced Lecture | FruTech.io
SAP Advanced Lecture | FruTech.io
 
Fru 2022 | Tech Trends, Themes, Thoughts, Perspectives and Predictions
Fru 2022 | Tech Trends, Themes, Thoughts, Perspectives and PredictionsFru 2022 | Tech Trends, Themes, Thoughts, Perspectives and Predictions
Fru 2022 | Tech Trends, Themes, Thoughts, Perspectives and Predictions
 
10 Top Newsworthy Tech Industry Headlines Of 2020 | Other Than COVID
10 Top Newsworthy Tech Industry Headlines Of 2020 | Other Than COVID10 Top Newsworthy Tech Industry Headlines Of 2020 | Other Than COVID
10 Top Newsworthy Tech Industry Headlines Of 2020 | Other Than COVID
 
10 Tech Conferences to Attend in 2021
10 Tech Conferences to Attend in 202110 Tech Conferences to Attend in 2021
10 Tech Conferences to Attend in 2021
 
10 Jobs in Tech that DON'T require you to CODE
10 Jobs in Tech that DON'T require you to CODE10 Jobs in Tech that DON'T require you to CODE
10 Jobs in Tech that DON'T require you to CODE
 
10 Brilliant ‘Tech’ Gifts for Remote Workers | 2021
10 Brilliant ‘Tech’ Gifts for Remote Workers |  2021 10 Brilliant ‘Tech’ Gifts for Remote Workers |  2021
10 Brilliant ‘Tech’ Gifts for Remote Workers | 2021
 
10 Most Used AWS Services To LEARN For A Career Boost
10 Most Used AWS Services To LEARN For A Career Boost10 Most Used AWS Services To LEARN For A Career Boost
10 Most Used AWS Services To LEARN For A Career Boost
 
10 Soft Skills Every Tech Professional Must Master For Career Success
10 Soft Skills Every Tech Professional Must Master For Career Success10 Soft Skills Every Tech Professional Must Master For Career Success
10 Soft Skills Every Tech Professional Must Master For Career Success
 
10 Basic Skills Needed For Entry Level I.T. Jobs
10 Basic Skills Needed For Entry Level I.T. Jobs10 Basic Skills Needed For Entry Level I.T. Jobs
10 Basic Skills Needed For Entry Level I.T. Jobs
 
10 Beginner Settings to Look At with Snowflake Web UI
10 Beginner Settings to Look At with Snowflake Web UI10 Beginner Settings to Look At with Snowflake Web UI
10 Beginner Settings to Look At with Snowflake Web UI
 
10 Smart Questions To Ask Hiring Managers In A Job Interview
10 Smart Questions To Ask Hiring Managers In A Job Interview10 Smart Questions To Ask Hiring Managers In A Job Interview
10 Smart Questions To Ask Hiring Managers In A Job Interview
 
10 Non-Tech Degrees That Will Help You With a Career In I.T.
10 Non-Tech Degrees That Will Help You With a Career In I.T. 10 Non-Tech Degrees That Will Help You With a Career In I.T.
10 Non-Tech Degrees That Will Help You With a Career In I.T.
 
10 Amazing Benefits and Advantages of Online Degrees
10 Amazing Benefits and Advantages of Online Degrees10 Amazing Benefits and Advantages of Online Degrees
10 Amazing Benefits and Advantages of Online Degrees
 
10 Concepts EVERY Self-Taught Tech Professionals Should Know
10 Concepts EVERY Self-Taught Tech Professionals Should Know10 Concepts EVERY Self-Taught Tech Professionals Should Know
10 Concepts EVERY Self-Taught Tech Professionals Should Know
 
10 Acronyms Every TECH Professional Should Know | 2021
10 Acronyms Every TECH Professional Should Know | 202110 Acronyms Every TECH Professional Should Know | 2021
10 Acronyms Every TECH Professional Should Know | 2021
 
10 Brilliant ‘Tech’ Gifts for Remote Workers | 2021
10 Brilliant ‘Tech’ Gifts for Remote Workers |  2021 10 Brilliant ‘Tech’ Gifts for Remote Workers |  2021
10 Brilliant ‘Tech’ Gifts for Remote Workers | 2021
 
10 Tech Essentials Your Home Office Needs | Work From Home | WFH | 2021
10 Tech Essentials Your Home Office Needs | Work From Home | WFH | 202110 Tech Essentials Your Home Office Needs | Work From Home | WFH | 2021
10 Tech Essentials Your Home Office Needs | Work From Home | WFH | 2021
 
10 Data Science, Machine Learning & AI Projects You Can Try Today
10 Data Science, Machine Learning & AI Projects You Can Try Today10 Data Science, Machine Learning & AI Projects You Can Try Today
10 Data Science, Machine Learning & AI Projects You Can Try Today
 
10 Things Every Tech Employee Must Do Right After You Land Your Dream Job
10 Things Every Tech Employee Must Do Right After You Land Your Dream Job10 Things Every Tech Employee Must Do Right After You Land Your Dream Job
10 Things Every Tech Employee Must Do Right After You Land Your Dream Job
 

Kürzlich hochgeladen

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 

Kürzlich hochgeladen (20)

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

Weather scraper for your data warehouse

  • 1. 1 Weather Scraper Get weather Information for your data warehouse and reporting/analytical needs. Create SQL Table to Store the Weather Information: CREATE TABLE [dbo].[Weather]( [ID] [int] IDENTITY(1,1) NOT NULL, [InsertDate] [varchar](255) NULL, [ZipCode] [varchar](255) NULL, [CityID] [varchar](255) NULL, [CityName] [varchar](255) NULL, [CoordLong] [varchar](255) NULL, [CoordLat] [varchar](255) NULL, [Country] [varchar](255) NULL, [SunriseStart] [varchar](255) NULL, [SunriseSet] [varchar](255) NULL, [TemperatureAvg] [varchar](255) NULL, [TemperatureMin] [varchar](255) NULL, [TemperatureMax] [varchar](255) NULL, [TemperatureUnit] [varchar](255) NULL, [HumidityValue] [varchar](255) NULL, [HumidityUnit] [varchar](255) NULL, [PressureValue] [varchar](255) NULL, [PressureUnit] [varchar](255) NULL, [WindSpeedValue] [varchar](255) NULL, [WindSpeedName] [varchar](255) NULL, [WindDirectionValue] [varchar](255) NULL, [WindDirectionCode] [varchar](255) NULL, [WindDirectionName] [varchar](255) NULL, [CloudValue] [varchar](255) NULL, [CloudName] [varchar](255) NULL, [PrecipitationMode] [varchar](255) NULL, [WeatherNumber] [varchar](255) NULL, [WeatherValue] [varchar](255) NULL, [WeatherIcon] [varchar](255) NULL, [LastUpdateValue] [varchar](255) NULL, PRIMARY KEY CLUSTERED ( [ID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO After Table is created, we will use the http://api.openweathermap.org RESTful API to access and store the Weather Information. You can see sample weather information returned from query by accessing this link: http://api.openweathermap.org/data/2.5/weather?q=55441&mode=xml
  • 2. 2 SSIS Package The package is very simple. 1. Get List all all the ZipCodes 2. Loop through each ZipCode and Get Current Weather Information For. Details:
  • 3. 3 SELECT DISTINCT [ZipCode] FROM [dbo].[ZipCodes] order by ZipCode Desc
  • 4. 4 Store Results in Variable. Loop through each Individual ZipCode in the ForEachLoop Container.
  • 5. 5 Map the Individual Zip Codes to a ZipCode Variable.
  • 6. 6 Pass the “loaded” ZipCode variable in the ForEachLoop container to the script task so as to pull the weather information for particular ZipCode.
  • 7. 7 Edit the Script Task. To see the Code: This is the Key:  Build your URL using the ZipCode in order to get the result  I specify USA in the string to return only US results. There is much documentation on the openweathermap website on how to search for specific data.  http://api.openweathermap.org/API#search_city var url = @"http://api.openweathermap.org/data/2.5/weather?q="+ZipCode+",USA&mode=xml"; The two methods in my implementation are the main() method and the SaveWeatherData()
  • 8. 8 MainMethod builds URL, makes call to API, and parses out the resulting XML. SaveWeatherData Method, is called by main method. It takes parameter values and persist them in the database table.
  • 9. 9 Each time the Script tasked is call, the weather data for that ZipCode be returned and inserted into your table. The execution looks like this. Your Results should look like this.
  • 10. 10 Now, you have detailed weather information with date and zip codes at your disposal. You can tie this with location information in your database or data warehouse to do extensive querying. E.g.  How does rain affect my sales by region  How does humidity affect sales  How does cloud cover affect sales  How does weather affect tips  How does weather affect Employee productivity The job can be scheduled to run hourly, daily, weekly or whatever frequency you want. The sky (pun intended) is virtually the limit on this. Good Luck. About: Fru Louis is a developer, blogger and all around technology enthusiasts. Fru is also a contributor and principal of the BIWizzard blog. He writes and stays abreast with the latest innovative ideas, news, and trends. Have a tip, comment or critic? Email him at fru.louis.gmail.com.