Skip to content

bigquery-script

View Readme
View Code
1
create schema klaviyo;
2
create table klaviyo.klaviyo_profile (
3
id string(32) not null,
4
external_id string,
5
email string,
6
phone_number string,
7
first_name string,
8
last_name string,
9
title string,
10
organization string,
11
properties json,
12
image string,
13
created timestamp,
14
updated timestamp,
15
location_address1 string,
16
location_address2 string,
17
location_city string,
18
location_country string,
19
location_latitude string,
20
location_longitude string,
21
location_region string,
22
location_zip string
23
);
24
create table klaviyo.klaviyo_event (
25
id string(32) not null,
26
metric_id string not null,
27
profile_id string,
28
event_properties json,
29
datetime timestamp,
30
uuid string
31
);
32
CREATE TABLE IF NOT EXISTS klaviyo.klaviyo_metric (
33
id STRING(6) NOT NULL,
34
name STRING NOT NULL,
35
integration_id STRING(50) NOT NULL,
36
integration_name STRING NOT NULL,
37
integration_category STRING NOT NULL,
38
created TIMESTAMP,
39
updated TIMESTAMP
40
);
41
grant `roles/bigquery.dataOwner` on schema klaviyo to "serviceAccount:SERVICE ACCOUNT EMAIL";
42
Information
Last Updated
4/2/24 @ 3:17 PM
Developed by
Napkin Team
Language
Node.js
Tags