August 15, 2023

tGoogleAddressRow – Docs for ESB 6.x

tGoogleAddressRow

Converts human-readable addresses into geographic coordinates and other
geographic information.

tGoogleAddressRow retrieves geographic information in a two-step
process:

  1. tGoogleAddressRow accesses the Google Places API Text Search Service via a HTTP request
    to get the place_id which uniquely identifies the address you
    provided.
  2. Then, tGoogleAddressRow accesses the Google Places API via a
    HTTP request to obtain geographic coordinates and other geographic information
    according to the place_id of the address you provided. For more
    information, see Place Details.

For further information about Google Places API, see Google Places API Web Service.

Each data row needs one or several calls to the Places API. The quota will
depend on the license provided by Google. Make sure not to run the component on a data
set that exceeds your quota, otherwise you will get error messages and addresses will
not be corrected.

For further information about the usage limits of Google Places API, see
Usage Limits and Billing.

tGoogleAddressRow Standard properties

These properties are used to configure tGoogleAddressRow running in the Standard Job framework.

The Standard
tGoogleAddressRow component belongs to the Data Quality family.

This component is available in the Palette of the Studio only if you have subscribed to one of the Talend Platform products.

Basic settings

Pause(in 1/10 seconds)

Time break between http requests for geographic information
record. By default, the value for this field is 1.

Schema and Edit
Schema

A schema is a row description, it defines the number of fields to
be processed and passed on to the next component. The schema is
either Built-in or stored remotely
in the Repository.

 Address column

From this list, select a parameter to be used in sending request
to Google Places API. Parameters in this list are predefined in the
schema of input data.

API key

Enter your API key in this field.

For more information about how to get an API key, see https://developers.google.com/places/web-service/get-api-key.

Note:

Jobs migrated from releases older than 5.6 will need
a key to run. Generate a key and set it in tGoogleAddressRow basic settings
before running the Job.

The component currently works with the Google Places
API and not the Google Geocoding API as it was the case in releases
older than 5.6. As a result, when you run the migrated Jobs in the
current studio, you will have geographic information different from
what you had in older studios. For example, the Location_type column outputs ROOFTOP in older releases, while it outputs
street_address now. You can find the list
of location types at Place
Types
.

Die on error

This check box is selected by default.

Clear the check box to skip any rows on error and complete the process for
error-free rows. When errors are skipped, you can collect the rows on error using a Row > Reject link.

Advanced settings

tStatCatcher Statistics

Select this check box to collect log data at the component
level.

Enable parallel execution
Select this check box to perform high-speed data processing, by treating multiple data flows
simultaneously. Note that this feature depends on the database or the application ability to
handle multiple inserts in parallel as well as the number of CPU affected. In the Number of parallel executions field, either:

  • Enter the number of parallel executions desired.

  • Press Ctrl + Space and select the appropriate
    context variable from the list. For further information, see
    Talend Studio
    User Guide
    .

Note that when parallel execution is enabled, it is not possible to use global variables to
retrieve return values in a subjob.

  • The Action on table
    field is not available with the parallelization function. Therefore, you
    must use a tCreateTable component if you
    want to create a table.

  • When parallel execution is enabled, it is not possible to use global
    variables to retrieve return values in a subjob.

Global Variables

Global Variables

ERROR_MESSAGE: the error message generated by the
component when an error occurs. This is an After variable and it returns a string. This
variable functions only if the Die on error check box is
cleared, if the component has this check box.

A Flow variable functions during the execution of a component while an After variable
functions after the execution of the component.

To fill up a field or expression with a variable, press Ctrl +
Space
to access the variable list and choose the variable to use from it.

For further information about variables, see
Talend Studio

User Guide.

Usage

Usage rule

This component is used as an in-between component. It requires
an input component, an output component and row Main link.

Scenario: Obtaining detailed geographic information using address information

This scenario applies only to a subscription-based Talend Platform solution or Talend Data Fabric.

This scenario describes a three-component Job which send HTTP request to Google Places
API and obtain detailed geographic information based on the address we provided.

use_case-tgoogleaddressrow1.png

Setting up the Job

  1. Drop the following components from the Palette onto the design workspace: tFixedFlowInput, tGoogleAddressRow and tLogRow
  2. Connect tFixedFlowInput to tGoogleAddressRow and tGoogleAddressRow to tLogRow using Main links.

Configuring the components

  1. Double-click tFixedFlowInput to display
    its Basic settings view to define its
    properties.

    use_case-tgoogleaddressrow2.png

  2. Click Edit schema to open a dialog box
    that displays the data structure of input data and define the data you want
    to pass to tGoogleAddressRow, two columns
    in this scenario, AddressID and
    Address, and then click OK to close the dialog box.

    use_case-tgoogleaddressrow3.png

  3. Click Use Inline Table in the Mode area of the Basic
    settings
    view of tFixedFlowInput, and click the [+] button to add one column to the table.
  4. Fill in the field in the AddressID column with
    1 and the Address column with
    "500 Oracle Parkway,Redwood Shores, CA 94065".
  5. Double-click tGoogleAddressRow to display
    its Basic settings view and define its
    properties.

    use_case-tgoogleaddressrow4.png

  6. Select Address from the Address Column list and let the rest of settings
    as they are.
  7. Double-click tLogRow to display its
    Basic settings view and define its
    properties.

    use_case-tgoogleaddressrow5.png

  8. Select Vertical (each row is a key/value
    list)
    in the Mode area and
    Print unique name in the Title printing mode area.

Executing the Job

Save your Job and press F6 to execute
it.

Google Places API has query limits for applications that submit requests.
For further information about the usage limits of Google Places API, see
Usage Limits and
Billing
.
use_case-tgoogleaddressrow6.png

The detailed geographic information of 500 Oracle Parkway,Redwood
Shores, CA 94065
is obtained from the Google Map database and
printed onto the console.


Document get from Talend https://help.talend.com
Thank you for watching.
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x