Skip to main content
It is possible to specify a postal code as a standalone column, but this will be interpreted as American without a proper prefix. To use Spanish postal codes indicate this using the “CP” prefix, e.g. “CP 28001”. To use this step your team needs to have the Google Location integration configured in Graphext. The corresponding credentials are required to connect to a third-party API. You can configure API integrations following the INTEGRATIONS or ADD INTEGRATION link in the top-left corner of your Team’s page, selecting API keys, and then the name of the desired third-party service. To enable the Google Location integration in particular you will need access to Google’s geocoding service. Follow the instructions here to create the required API key.

Usage

The following example shows how the step can be used in a recipe.

Examples

  • Example 1
  • Signature
Since the step has no configuration parameters, simply use
fetch_location(ds.address) -> (
  ds.canonical_address,
  ds.locality,
  ds.area,
  ds.state,
  ds.country,
  ds.lat,
  ds.lon)

Inputs & Outputs

The following are the inputs expected by the step and the outputs it produces. These are generally columns (ds.first_name), datasets (ds or ds[["first_name", "last_name"]]) or models (referenced by name e.g. "churn-clf").
*address_columns
column[text|category|number]
One or more text or categorical columns containing all or parts of an address (e.g. street, city, postal code etc.). If several parts are specified in a single column they should be separated by a comma.
formatted_address
column[category]
required
Categorical column containing the original address in a standardized format.
locality
column[category]
required
Categorical column containing each address’s locality.
area
column[category]
required
Categorical column containing each address’s area.
state
column[category]
required
Categorical column containing each address’s state or region.
country
column[category]
required
Categorical column containing each address’s country.
lat
column[number]
required
Numeric column containing the latitude coordinate of the address.
lon
column[number]
required
Numeric column containing the longitude coordinate of the address.

Configuration

The following parameters can be used to configure the behaviour of the step by including them in a json object as the last “input” to the step, i.e. step(..., {"param": "value", ...}) -> (output).

Parameters

integration
string
required
ID of the integration you’d like to use.
I