version: 1
name: rest_to_bigquery_matrix
pipeline:
source:
type: rest
config:
base_url: https://api.example.com
method: GET
auth:
type: bearer
config:
token: ${env:API_TOKEN}
pagination:
type: PageNumber
param_name: page
start_page: 1
page_size: 500
page_size_param: per_page
max_pages: 200
timeout: 30
max_retries: 5
retry_backoff: 2
tolerated_http_errors: []
replication_method:
type: FullTable
partitions: []
schema_sample_size: 100
sink:
type: bigquery
config:
project_id: my-gcp-project
auth:
type: service_account_key
config:
json: ${env:GCP_KEY_JSON}
batch_size: 1000
matrix:
- id: users
source:
config:
path: /v1/users
name: users
records_path: $.users[*]
primary_keys: [id]
sink:
config:
dataset_id: analytics
table_id: users
- id: products
source:
config:
path: /v1/products
name: products
records_path: $.products[*]
primary_keys: [sku]
sink:
config:
dataset_id: analytics
table_id: products
- id: orders
source:
config:
path: /v1/orders
name: orders
records_path: $.orders[*]
primary_keys: [order_id]
sink:
config:
dataset_id: analytics
table_id: orders
execution:
max_concurrent: 3
on_error: continue