-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbigquery_ddls.sql
105 lines (95 loc) · 3.25 KB
/
bigquery_ddls.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
-- DDL for <project id>.<dataset>.coreruby_appointment_service_types_native
CREATE TABLE `<project id>.<dataset>.coreruby_appointment_service_types_native` (
`uuid` STRING,
`name` STRING,
`description` STRING,
`created_at` TIMESTAMP,
`updated_at` TIMESTAMP,
`partitiontime` TIMESTAMP,
`metadata` STRUCT<kafka_metadata STRUCT<offset INT64>>,
`grouping` STRING
);
-- DDL for <project id>.<dataset>.coreruby_appointments_native
CREATE TABLE `<project id>.<dataset>.coreruby_appointments_native` (
`id` INT64,
`created_at` TIMESTAMP,
`consultant_id` INT64,
`consumer_network_id` INT64,
`appointment_service_type_uuid` STRING,
`partitiontime` TIMESTAMP,
`metadata` STRUCT<kafka_metadata STRUCT<offset INT64>>
);
-- DDL for <project id>.<dataset>.coreruby_consultants_native
CREATE TABLE `<project id>.<dataset>.coreruby_consultants_native` (
`id` INT64,
`name` STRING,
`partitiontime` TIMESTAMP,
`metadata` STRUCT<kafka_metadata STRUCT<offset INT64>>
);
-- DDL for <project id>.<dataset>.coreruby_consultants_regions_native
CREATE TABLE `<project id>.<dataset>.coreruby_consultants_regions_native` (
`consultant_id` INT64,
`region_id` INT64,
`specialism_id` INT64,
`partitiontime` TIMESTAMP,
`metadata` STRUCT<kafka_metadata STRUCT<offset INT64>>
);
-- DDL for <project id>.<dataset>.coreruby_consumer_networks_native
CREATE TABLE `<project id>.<dataset>.coreruby_consumer_networks_native` (
`id` INT64,
`name` STRING,
`region_id` INT64,
`partitiontime` TIMESTAMP,
`metadata` STRUCT<kafka_metadata STRUCT<offset INT64>>
);
-- DDL for <project id>.<dataset>.coreruby_credit_cards_native
CREATE TABLE `<project id>.<dataset>.coreruby_credit_cards_native` (
`id` INT64,
`card_type` STRING,
`masked_number` STRING,
`expiration_date` DATE,
`cardholder_name` STRING,
`billing_address` STRING,
`created_at` TIMESTAMP,
`updated_at` TIMESTAMP,
`metadata` STRUCT<kafka_metadata STRUCT<offset INT64>>,
`partitiontime` TIMESTAMP
);
-- DDL for <project id>.<dataset>.coreruby_specialism_categories_native
CREATE TABLE `<project id>.<dataset>.coreruby_specialism_categories_native` (
`id` INT64,
`new_name` STRING,
`partitiontime` TIMESTAMP,
`metadata` STRUCT<kafka_metadata STRUCT<offset INT64>>
);
-- DDL for <project id>.<dataset>.coreruby_specialisms_native
CREATE TABLE `<project id>.<dataset>.coreruby_specialisms_native` (
`id` INT64,
`specialism_category_id` INT64,
`new_name` STRING,
`partitiontime` TIMESTAMP,
`metadata` STRUCT<kafka_metadata STRUCT<offset INT64>>
);
-- DDL for <project id>.<dataset>.coreruby_transaction_details_native
CREATE TABLE `<project id>.<dataset>.coreruby_transaction_details_native` (
`id` INT64,
`transaction_id` INT64,
`name` STRING,
`kind` STRING,
`amount_cents` INT64,
`created_at` TIMESTAMP,
`metadata` STRUCT<kafka_metadata STRUCT<offset INT64>>,
`partitiontime` TIMESTAMP
);
-- DDL for <project id>.<dataset>.coreruby_transactions_native
CREATE TABLE `<project id>.<dataset>.coreruby_transactions_native` (
`id` INT64,
`created_at` TIMESTAMP,
`price_cents` INT64,
`braintree_transaction_token` STRING,
`credit_card_id` INT64,
`purchase_id` INT64,
`partitiontime` TIMESTAMP,
`metadata` STRUCT<kafka_metadata STRUCT<offset INT64>>,
`refunded_at` DATETIME
);