-
Notifications
You must be signed in to change notification settings - Fork 1
/
dlt-pipedrive-to-bigquery.yaml
55 lines (49 loc) · 1.86 KB
/
dlt-pipedrive-to-bigquery.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
id: dlt-pipedrive-to-bigquery
namespace: company.team
tasks:
- id: dlt_pipeline
type: io.kestra.plugin.scripts.python.Script
taskRunner:
type: io.kestra.plugin.scripts.runner.docker.Docker
containerImage: python:3.11
beforeCommands:
- pip install dlt[bigquery]
- dlt --non-interactive init pipedrive bigquery
warningOnStdErr: false
env:
DESTINATION__BIGQUERY__CREDENTIALS__PROJECT_ID: "{{ secret('BIGQUERY_PROJECT_ID') }}"
DESTINATION__BIGQUERY__CREDENTIALS__PRIVATE_KEY: "{{ secret('BIGQUERY_PRIVATE_KEY') }}"
DESTINATION__BIGQUERY__CREDENTIALS__CLIENT_EMAIL: "{{ secret('BIGQUERY_CLIENT_EMAIL') }}"
SOURCES__PIPEDRIVE__CREDENTIALS__PIPEDRIVE_API_KEY: "{{ secret('PIPEDRIVE_API_KEY') }}"
script: |
import dlt
from pipedrive import pipedrive_source
pipeline = dlt.pipeline(
pipeline_name="pipedrive_pipeline",
destination="biquery",
dataset_name="pipedrive",
)
load_info = pipeline.run(pipedrive_source())
triggers:
- id: hourly
type: io.kestra.plugin.core.trigger.Schedule
cron: "@hourly"
extend:
title: Ingest Pipedrive CRM data to BigQuery using dlt and schedule it to run
every hour
description: >-
This flow demonstrates how to extract data from Pipedrive CRM and load it
into BigQuery using dlt. The entire workflow logic is contained in a single
Python script that uses the dlt Python library to ingest the data to
BigQuery.
The credentials to access the Pipedrive API and BigQuery are stored using
Secret.
tags:
- Ingest
- Python
ee: false
demo: false
meta_description: "This flow extract data from Pipedrive CRM and load it into
BigQuery using dlt. The entire workflow logic is contained in a single
Python script that uses the dlt Python library to ingest the data to
BigQuery. "