See also
Tags
To send data to the SQL server, you must use the 'Send to SQL' building block. Let's say, you have a table named table1 in a Postgres database. This table has two columns: col1 and col2.
We aim to populate this table with values from Facebook's Ad Name and Clicks columns.
We'll create a workflow using three building blocks:
-
Download data from Facebook
-
Select the desired columns
-
Send data to SQL
You need to write an SQL expression, which Conduit executes for each row in the dataset. Macros (e.g., {Ad} and {Clicks} as shown in the screenshot) are placeholders that Conduit replaces with values from the corresponding columns of the dataset.
Additionally, there is a special macro, {RowUpdatedId}. This is generated as a hash of all dimensions, but not metrics. You can use this value to update rows in the table.