Hi everybody! I am new in Airbute and I need to sy...
# replication-troubleshooting
s
Hi everybody! I am new in Airbute and I need to sync data from Hubspot to Postgres. I did initial sync using my local machine with docker-compose and now I have 2 problems 1. How I can setup this sync programmatically using my own docker-compose configuration? There is Postgres DB there so I want to pull all the data there. 2. I see some unwanted things in resulting DB: no assiciation table, bad type for IDs e t.c. How can I tune sync process?
w
Hubspot to Postgres should be extremely simple, you add Hubspot with your private app token as a source and the Psotgres login credentials to make a destination. You shouldnt need any sort of docker compose up on the actual Hubspot or Postgres connector for it to work beyond spinning up Airbyte itself. Then you just connect them. The "replication" tab will allow to select the individual tables that you are after. The tables that are available to sync is highly dependent on the scope you gave the private app when you set it up in Hubspot. If you are upset with the structure of the data, you can use a custom DBT workflow to make your desired transformations, or make view/local procs to do the transformation your way.
You say programmatically but setting up the sync using the Airbyte GUI would be far simpler. Just do that. What do you mean your own docker compose configuration?
s
Well, I have my docker-compose structure: • django application • postgres • nginx So I want to inject airbyte there somehow. For now I was able to run their own docker-compose locally, by pulling https://github.com/airbytehq/airbyte.git repo and start run-ab-platform.sh, then go to http://localhost:8000/, setup connection hubspot->postgres. Data was synchronized.
How can I change data structure using DBT transformation? I use Python as a main programming language.
n
Hi, Sergei! Have you checked out the API? You could use it to run things programmatically: https://airbyte-public-api-docs.s3.us-east-2.amazonaws.com/rapidoc-api-docs.html#servers We have a series of articles on dbt in the docs: https://docs.airbyte.com/operator-guides/transformation-and-normalization/transformations-with-sql
s
Thanks a lot! I will try
Well, about DBT - I figured it out