SlideShare uma empresa Scribd logo
1 de 10
Baixar para ler offline
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.

Mais conteúdo relacionado

Mais procurados

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
 

Mais procurados (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
 

Destaque

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
 

Destaque (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
 

Semelhante a 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 (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
 
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
 
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
 

Semelhante a 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 (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*...
 
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
 
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
 

Mais de 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
 

Mais de 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
 

Último

CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMKumar Satyam
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAnitaRaj43
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 

Último (20)

CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 

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.