Created
April 15, 2022 20:13
-
-
Save krummja/4cfe578816371ff105356b7d05576785 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Export Companies from Hubspot | |
-- Create a new table and import the CSV data | |
-- Create a new table with all Contact info, where we'll add the Company Hubspot ID as "Company HID" | |
-- Select all from existing contacts table | |
-- Left Join the table created from the exported CSV where contact company_id = exported Company EID | |
create table contacts_add_company_hid | |
as | |
select * | |
from defaultdb_public_contacts | |
left join hubspot_companies_export | |
on defaultdb_public_contacts.company_id = cast(hubspot_companies_export."Company EID" as integer); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment