-
Notifications
You must be signed in to change notification settings - Fork 1
/
cloudquery-sync-hn-to-parquet.yaml
60 lines (52 loc) · 1.76 KB
/
cloudquery-sync-hn-to-parquet.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
56
57
58
59
60
id: cloudquery-sync-hn-to-parquet
namespace: company.team
tasks:
- id: hn_to_parquet
type: io.kestra.plugin.cloudquery.CloudQueryCLI
inputFiles:
config.yml: |
kind: source
spec:
name: hackernews
path: cloudquery/hackernews
version: v3.1.5
tables: ["*"]
destinations:
- file
spec:
item_concurrency: 100
start_time: "{{ execution.startDate | dateAdd(-1, 'DAYS') }}"
---
kind: destination
spec:
name: file
path: cloudquery/file
version: v4.1.1
spec:
path: "{% raw %}{{TABLE}}/{{UUID}}.{{FORMAT}}{% endraw %}"
format: csv
outputFiles:
- "**/*.csv"
env:
CLOUDQUERY_API_KEY: 9ITIyNYb8s3Cr8nSiV4KcKVPGJNSd6u8
commands:
- cloudquery sync config.yml --log-console --log-level=warn
extend:
title: Extract data from HackerNews and store it in a local CSV file using
CloudQuery CLI
description: >-
This flow shows how to extract data from HackerNews using CloudQuery and
store it in a local CSV file.
You can use the same format to ingest data from any other source and load it
to any destination supported by CloudQuery.
To avoid parsing CloudQuery TABLE and UUID variables as Kestra's native
Pebble expressions, we use the `{% raw %}{{TABLE}}{% endraw %}` syntax.
Make sure to replace the API key with your API key as shown in [this blog
post](https://kestra.io/blogs/2024-03-12-introduction-to-cloudquery#how-cloudquery-works).
tags:
- Ingest
- CLI
ee: false
demo: true
meta_description: "This flow shows how to extract data from HackerNews using
CloudQuery and store it in a local Parquet file. "