Maish Maseeh
02/17/2022, 9:49 AMassociations
are specified for certain data types.
Are these associations simply missing?
But I feel more like I am doing something wrong since I imagine that anyone using the source would have a need for these links.
So I am probably simply not seeing something in the existing data.
Thanks,
JorinJorin
02/17/2022, 10:18 AMJorin
02/17/2022, 10:24 AMJorin
02/17/2022, 10:27 AMairbyte_companies_hashid
?Jorin
02/17/2022, 10:31 AM_airbyte_raw_hubspot_deals
table.
(This is in Postgres btw. Probably not a destination-specific thing though)Jorin
02/17/2022, 10:35 AM"deals"
to have associations for companies
and line_items
.
But I also don't feel like I understand the inner workings of this good enough. Maybe these associations are not needed and there are already ways to join the data.Jorin
02/17/2022, 10:57 AMJorin
02/17/2022, 11:07 AMselect * from airbyte._airbyte_raw_hubspot_deals where _airbyte_data::text like '%hash%'
Pras
02/17/2022, 12:31 PMPras
02/17/2022, 12:46 PM_airbyte_raw_hubspot_line_items
and also _airbyte_raw_hubspot_companies
Pras
02/17/2022, 12:47 PMPras
02/17/2022, 12:57 PMcontacts
for example) deals
to have an array of line_items
in the JSON.
Does that make sense?Pras
02/17/2022, 1:02 PMselect jsonb_pretty(_airbyte_data) from airbyte._airbyte_raw_hubspot_deals limit 1;
jsonb_pretty
----------------------------------------------------------------------------------------------------------------------------
{ +
"id": "173151854", +
"archived": false, +
"contacts": [ +
"170801" +
], +
"createdAt": "2017-07-14T13:34:03.412Z", +
"dealstage": { +
Pras
02/17/2022, 2:22 PMPras
02/17/2022, 2:36 PMdeals
table would have a line_items
array inside the json in the _airbyte_data
column,
then I would join each ID in the array with the id
field from the json in the the _airbyte_data
column in the line_items
table.
Sorry, that I can't follow what you mean by columns.Justin Reynolds
02/18/2022, 4:55 AMdeals
, companies
which should have the same column(hash_id) using which you can mapArasdan
02/18/2022, 10:33 AM\dt airbyte._airbyte_raw_hubspot_*
List of relations
Schema | Name | Type | Owner
---------+------------------------------------------------+-------+---------
airbyte | _airbyte_raw_hubspot_companies | table | airbyte
airbyte | _airbyte_raw_hubspot_contact_lists | table | airbyte
airbyte | _airbyte_raw_hubspot_contacts | table | airbyte
airbyte | _airbyte_raw_hubspot_contacts_list_memberships | table | airbyte
airbyte | _airbyte_raw_hubspot_deal_pipelines | table | airbyte
airbyte | _airbyte_raw_hubspot_deals | table | airbyte
airbyte | _airbyte_raw_hubspot_line_items | table | airbyte
airbyte | _airbyte_raw_hubspot_owners | table | airbyte
airbyte | _airbyte_raw_hubspot_products | table | airbyte
airbyte | _airbyte_raw_hubspot_property_history | table | airbyte
airbyte | _airbyte_raw_hubspot_quotes | table | airbyte
(11 rows)
Maybe systems other than Postgres actually work completely different?
But it's also fine to stop this here. I feel like I already took too much of your time.
I will search more in the tables and then I might try forking Airbyte to add the associations I think are missing. Let's see if that works. Luckily it is open source.
Thank you for your help 🙏Arasdan
02/18/2022, 10:38 AMArasdan
02/18/2022, 10:58 AM