Google Anlatics

Sunday, August 14, 2011

Google Maps v3 API and SSIS

This is the latest V3 API Version

http://code.google.com/apis/maps/documentation/geocoding/

And this is the link for Geocode Locations Using Google Maps v3 API and SSIS

http://www.sqlmusings.com/2011/03/25/geocode-locations-using-google-maps-v3-api-and-ssis/

To insert for SQL table these are more detail about SSIS script component
These are more step than above mention link step.pls refer above link and if need more details see below additional steps.

Create Data Flow













Go to the Data Flow and added ADO or OLDEDB Data Source and after that add Script Component


















ADO .NET link connection and Output Table can be set like below Image.






Edit the Script









Set the Inputs and Outputs


Set the Connection 




Little overview of the Main Code


















Like below code can be use stored procedure OR SQL Query for insert to table.
This code cannot be debugging and using Windows message can be set message to see the output and windows.Forms namespace has to import.
To use Google map refer above given link it is very easy to use Goggle Map with SSIS.

These are status code will be provide by the Google and can be customize code using it

Status Codes

The "status" field within the Geocoding response object contains the status of the request, and may contain debugging information to help you track down why Geocoding is not working. The "status" field may contain the following values:
• "OK" indicates that no errors occurred; the address was successfully parsed and at least one geocode was returned.
• "ZERO_RESULTS" indicates that the geocode was successful but returned no results. This may occur if the geocode was passed a non-existent address or a latlng in a remote location.
• "OVER_QUERY_LIMIT" indicates that you are over your quota.
• "REQUEST_DENIED" indicates that your request was denied, generally because of lack of a sensor parameter.
• "INVALID_REQUEST" generally indicates that the query (address or latlng) is missing.


Pls take to consider below Usage Limits othe wise you account will block by the google if you try use it for more data.


Usage Limits


Use of the Google Geocoding API is subject to a query limit of 2,500 geolocation requests per day. (User of Google Maps API Premier may perform up to 100,000 requests per day.) This limit is enforced to prevent abuse and/or repurposing of the Geocoding API, and this limit may be changed in the future without notice. Additionally, we enforce a request rate limit to prevent abuse of the service. If you exceed the 24-hour limit or otherwise abuse the service, the Geocoding API may stop working for you temporarily. If you continue to exceed this limit, your access to the Geocoding API may be blocked.

No comments:

Sri Lanka .NET 
                Forum Member