Connecting to Criteo via SQL
You can use SQL to connect to Criteo in the Data Virtuality Studio or the Code Editor in the Web UI.
Pre-requisites
How to Connect
Before you start retrieving data, you need to run the connector script for Criteo in the Data Virtuality Studio or the Web UI and enter your credentials in the following lines:
SQL
CALL SYSADMIN.createConnection (
name => 'criteo_src'
,jbossCLITemplateName => 'ws'
,connectionOrResourceAdapterProperties => 'EndPoint=https://api.criteo.com/marketing/v1,ClientId=<ClientId>,ClientSecret=<ClientSecret>'
);;
CALL SYSADMIN.createDataSource (
name => 'criteo_src'
,translator => 'criteo'
,modelProperties => 'cleanupMethod=DELETE,multitenancy_tablename=<multitenancy_tablename>'
,translatorProperties => ''
);;
-- The next statement is optional, view name may be changed, e.g. to dwh.CriteoCredentials, and it should be present in the model properties
CREATE VIEW views.Credentials
AS
SELECT
'<label_1>' AS label,
'<clientId>' AS clientId,
'<clientSecret>' AS clientSecret
UNION ALL
SELECT
'<label_2>' AS label,
'<clientId>' AS clientId,
'<clientSecret>' AS clientSecret
-- You may add additional tetrads using 'UNION ALL', making sure labels are unique
;;
|