Marketo
This page contains the setup guide and reference information for the Marketo source connector.
Prerequisites
- (Optional) Whitelist Airbyte's IP address if needed
- An API-only Marketo User Role
- An Airbyte Marketo API-only user
- A Marketo API Custom Service
- Marketo Client ID & Client Secret
- Marketo Base URL
Setup guide
Step 1: Set up Marketo
Step 1.1: (Optional) whitelist Airbyte's IP address
If you don't have IP Restriction enabled in Marketo, skip this step.
If you have IP Restriction enabled in Marketo, you'll need to whitelist the IP address of the machine running your Airbyte instance. To obtain your IP address, run curl ifconfig.io
from the node running Airbyte. You might need to enlist an engineer to help with this. Copy the IP address returned and keep it on hand.
Once you have the IP address, whitelist it by following the Marketo documentation for allowlisting IP addresses for API based access.
Step 1.2: Create an API-only Marketo User Role
Follow the Marketo documentation for creating an API-only Marketo User Role.
Step 1.3: Create an Airbyte Marketo API-only user
Follow the Marketo documentation to create an API only user
Step 1.4: Create a Marketo API custom service
Follow the Marketo documentation for creating a custom service for use with a REST API.
Make sure to follow the "Credentials for API Access" section in the Marketo docs to generate a Client ID and Client Secret. Once generated, copy those credentials and keep them handy for use in the Airbyte UI later.
Step 1.5: Obtain your Endpoint and Identity URLs provided by Marketo
Follow the Marketo documentation for obtaining your base URL. Specifically, copy your Endpoint without "/rest" and keep them handy for use in the Airbyte UI.
We're almost there! Armed with your Endpoint & Identity URLs and your Client ID and Secret, head over to the Airbyte UI to setup Marketo as a source.
Step 2: Set up the Marketo connector in Airbyte
For Airbyte Cloud:
- Log into your Airbyte Cloud account.
- In the left navigation bar, click Sources. In the top-right corner, click +new source.
- On the Set up the source page, enter the name for the Marketo connector and select Marketo from the Source type dropdown.
- Enter the start date, domain URL, client ID and secret
- Submit the form
For Airbyte Open Source:
- Navigate to the Airbyte Open Source dashboard
- Set the name for your source
- Enter the start date
- Enter the domain URL
- Enter client ID and secret
- Click Set up source
Supported sync modes
The Marketo source connector supports the following sync modes:
- Full Refresh | Overwrite
- Full Refresh | Append
- Incremental | Append
- Incremental | Deduped
Supported Streams
This connector can be used to sync the following tables from Marketo:
- Activities_X where X is an activity type contains information about lead activities of the type X. For example, activities_send_email contains information about lead activities related to the activity type
send_email
. See the Marketo docs for a detailed explanation of what each column means. - Activity types Contains metadata about activity types. See the Marketo docs for a detailed explanation of columns.
- Campaigns: Contains info about your Marketo campaigns.
- Leads: Contains info about your Marketo leads.
Available fields are limited by what is presented in the static schema.
- Lists: Contains info about your Marketo static lists.
- Programs: Contains info about your Marketo programs.
- Segmentations: Contains info about your Marketo programs.
Performance considerations
By default, Marketo caps all accounts to 50,000 API calls per day.
By default, this connector caps itself to 40,000 API calls per day. But you can also customize the maximum number of API calls this source connector makes per day to Marketo (which may be helpful if you have for example other applications which are also hitting the Marketo API). If this source connector reaches the maximum number you configured, it will not replicate any data until the next day.
If the 50,000 limit is too stringent, contact Marketo support for a quota increase.
Data type map
Integration Type | Airbyte Type | Notes |
---|---|---|
array | array | primitive arrays are converted into arrays of the types described in this table |
int , long | number | |
object | object | |
string | string | `` |
Namespaces | No |
Build instructions
Build your own connector image
This connector is built using our dynamic built process.
The base image used to build it is defined within the metadata.yaml file under the connectorBuildOptions
.
The build logic is defined using Dagger here.
It does not rely on a Dockerfile.
If you would like to patch our connector and build your own a simple approach would be:
- Create your own Dockerfile based on the latest version of the connector image.
FROM airbyte/source-marketo:latest
COPY . ./airbyte/integration_code
RUN pip install ./airbyte/integration_code
# The entrypoint and default env vars are already set in the base image
# ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
# ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]
Please use this as an example. This is not optimized.
- Build your image:
docker build -t airbyte/source-marketo:dev .
# Running the spec command against your patched connector
docker run airbyte/source-marketo:dev spec
Customizing our build process
When contributing on our connector you might need to customize the build process to add a system dependency or set an env var.
You can customize our build process by adding a build_customization.py
module to your connector.
This module should contain a pre_connector_install
and post_connector_install
async function that will mutate the base image and the connector container respectively.
It will be imported at runtime by our build process and the functions will be called if they exist.
Here is an example of a build_customization.py
module:
from __future__ import annotations
from typing import TYPE_CHECKING
if TYPE_CHECKING:
# Feel free to check the dagger documentation for more information on the Container object and its methods.
# https://dagger-io.readthedocs.io/en/sdk-python-v0.6.4/
from dagger import Container
async def pre_connector_install(base_image_container: Container) -> Container:
return await base_image_container.with_env_variable("MY_PRE_BUILD_ENV_VAR", "my_pre_build_env_var_value")
async def post_connector_install(connector_container: Container) -> Container:
return await connector_container.with_env_variable("MY_POST_BUILD_ENV_VAR", "my_post_build_env_var_value")
Changelog
Version | Date | Pull Request | Subject |
---|---|---|---|
1.2.2 | 2023-10-13 | 31377 | Use our base image and remove Dockerfile |
1.2.1 | 2023-09-18 | 30533 | Fix json_schema for stream Leads |
1.2.0 | 2023-06-26 | 27726 | License Update: Elv2 |
1.1.0 | 2023-04-18 | 23956 | Add Segmentations Stream |
1.0.4 | 2023-04-25 | 25481 | Minor fix for bug caused by <= producing additional API call when there is a single date slice |
1.0.3 | 2023-02-13 | 22938 | Specified date formatting in specification |
1.0.2 | 2023-02-01 | 22203 | Handle Null cursor values |
1.0.1 | 2023-01-31 | 22015 | Set AvailabilityStrategy for streams explicitly to None |
1.0.0 | 2023-01-25 | 21790 | Fix activities_* stream schemas |
0.1.12 | 2023-01-19 | 20973 | Fix encoding error (note: this change is not in version 1.0.0, but is in later versions |
0.1.11 | 2022-09-30 | 17445 | Do not use temporary files for memory optimization |
0.1.10 | 2022-09-30 | 17445 | Optimize memory consumption |
0.1.9 | 2022-09-28 | 17304 | Migrate to per-stream sate. |
0.1.7 | 2022-08-23 | 15817 | Improved unit test coverage |
0.1.6 | 2022-08-21 | 15824 | Fix semi incremental streams: do not ignore start date, make one api call instead of multiple |
0.1.5 | 2022-08-16 | 15683 | Retry failed creation of a job instead of skipping it |
0.1.4 | 2022-06-20 | 13930 | Process failing creation of export jobs |
0.1.3 | 2021-12-10 | 8429 | Updated titles and descriptions |
0.1.2 | 2021-12-03 | 8483 | Improve field conversion to conform schema |
0.1.1 | 2021-11-29 | 0000 | Fix timestamp value format issue |
0.1.0 | 2021-09-06 | 5863 | Release Marketo CDK Connector |