This Airbyte Connector uses the HTTP API provided by the Arizona DOT in Python. With this connector, data is easily pulled from Arizona DOT and loaded into the ViaWarn Postgres database, and are available in the ViaWarn app.
The connector is built on top of the Airbyte open-source platform, which provides a standardized way of integrating data sources and destinations. It is designed to be simple and easy to use. The required configuration is show in the the sections below.
The pulled resources from the AZ 511 API are the following:
After creating the Airbyte connector template, modify the next files to retrieve data from Arizona DOT .
documentationUrl: https://….rvice
connectionSpecification: $schema:http://json-schema.org/draft-07/schema#
title: VIAWARN US AZ DOT Spec
type: object
required: -developer_api_key
properties: developer_api_key:
type: string
airbyte_secret: true
description: Developer API Key obtained from https:...
{
"developer_api_key":"[key]"
}
{
"streams":
[
{
"stream": {
"name": [STREAM_NAME],
"json_schema": {},
"supported_sync_modes": ["full_refresh"]
},
"sync_mode": "full_refresh", "destination_sync_mode": "overwrite"
}
]
}
Location: source-viawarn-viawarn-us-az-dot/source.py
This field is the common part of the URL for all streams, if it does not exist, add it in each stream method.
String
This is a constructor method used to initialize the class. It uses the ‘config’ object to define the ‘developer_api_key’ attribute.
return config[]
Pagination is not provided by this API.
return None
The API requires two parameters: the ‘Developer Key’ and the ‘format’ in which the data will be passed.
return a dictionary
It is a placeholder to store the request.response object and constructs the appropriate mapping object for each parsed element by each Stream class.
yields an empty dictionary.
Unique field required in the stream associate to each output record.
String
subdomain and parameters to pass into the URL.
return a string
Definition of how a response is parsed.
Set a definition to: primary key and ewkt fields.
return an iterable containing each record in the response.