TGViewer
Data Apps Design Data Apps Design @data_apps · 2.08K subscribers
Post #173 551
What is the easiest way to write custom data integration?

1. Fetch source data via API calls – E of ELT
2. Store raw data via S3 / Data Lake – L of ELT
3. Transform data as you wish via dbt – T from ELT

While focusing mainly on Transformations, which the most complex and interesting part and all about delivering business value, it is still essential to perform Extract-Load in clear and understandable way.

Shell script is the easist way to perform EL in my opinion (where possible 😉).

Take a look at the example of Fetching exchange rates →

1. Useful shell options options – debugging and safe exit.

set -x expands variables and prints a little + sign before the line.

set -e instructs bash to immediately exit if any command has a non-zero exit status

2. Variables

Either assign directly in bash script or provide as Environment Varabiables (preferred).

TS=`date +"%Y-%m-%d-%H-%M-%S-%Z"`

3. Chain or pipe commands

Result of one command could be input to another command.

JSON response fetched from API call gets transferred to AWS S3 bucket directly without any intermediate storage:

curl -H "Authorization: Token $OXR_TOKEN" \
"https://openexchangerates.org/api/historical/$BUSINESS_DT.json?base=$BASE_CURRENCY&symbols=$SYMBOLS" \
| aws s3 cp - s3://$BUCKET/$BUCKET_PATH/$BUSINESS_DT-$BASE_CURRENCY-$TS.json

4. Echo log messages

5. Schedule and monitor with Airflow.

Use templates, variables, loops, dynamic DAGs.

Do it right way once and just monitor for any errors. As simple as that.

6. Additional pros:

- Shell (bash, zsh) is already installed on most VMs
- No module importing / lib / dependency crap
- Ability to parallelize heavy commands and do it in optimal way
Gist Fetching exchange rates Fetching exchange rates. GitHub Gist: instantly share code, notes, and snippets.
More from @data_apps
  1. Aug 25, 2026🔸 Меня заблокировал Cursor Сообщение: Your Cursor account was closed following an account…
  2. Feb 27, 2026✅ 3 ОФФЕРА, мои мысли и рекомендации по поиску работы в 2026 в Data и IT в целом Салют! Чу…
  3. Feb 6, 2026Эксперимент успешный 😌 Чек-лист: https://gist.github.com/kzzzr/e49b7e0b2af01e4e1dbc57102d…
  4. Feb 6, 2026👀 DataLens: Бесплатная сказка закончилась. Кейс миграции на Superset (Open Source BI) 1 м…
  5. Feb 2, 2026😘 Открываю доступ к закрытым записям цикла Designing Modern Data Apps Всем привет! 🟡 Это…
  6. Jan 22, 2026☄ Открыт к предложениям: Staff Data Engineer / Data Platform Lead За 11+ лет я прошел путь…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →