forked from PostHog/snowflake-export-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplugin.json
166 lines (166 loc) · 5.5 KB
/
plugin.json
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
{
"name": "Snowflake Export Plugin",
"url": "https://github.com/posthog/snowflake-export-plugin",
"description": "Export PostHog events into Snowflake",
"main": "index.ts",
"posthogVersion": ">=1.25.0",
"config": [
{
"key": "account",
"name": "Snowflake account",
"type": "string",
"hint": "In the format of \"ab12345\" or \"ab12345.region.cloud\"",
"required": true
},
{
"key": "username",
"name": "Snowflake username",
"type": "string",
"required": true
},
{
"key": "password",
"name": "Snowflake password",
"type": "string",
"required": false,
"secret": true
},
{
"key": "database",
"name": "Snowflake database name",
"type": "string",
"required": true
},
{
"key": "dbschema",
"name": "Snowflake database schema",
"type": "string",
"default": "PUBLIC",
"required": true
},
{
"key": "table",
"name": "Snowflake table name",
"type": "string",
"required": true,
"hint": "Will be created if doesn't already exist."
},
{
"key": "warehouse",
"name": "Virtual warehouse to use for copying files",
"required": true,
"type": "string"
},
{
"key": "role",
"name": "Specify a role to access Snowflake with",
"type": "string",
"hint": "Optional, overrides the default role for the user."
},
{
"key": "stageToUse",
"name": "Stage type",
"type": "choice",
"required": true,
"choices": ["S3", "GCS"]
},
{
"key": "stage",
"name": "Name to use for external stage",
"type": "string",
"required": true,
"hint": "Will be created if doesn't already exist."
},
{
"key": "bucketName",
"name": "Bucket name",
"hint": "This should be strictly the **name** of your bucket without a path! You can specify a path to store files in below",
"type": "string",
"required": true
},
{
"key": "bucketPath",
"name": "Optional path under which the staged events should be stored in your bucket",
"hint": "E.g. `posthog/exports/`",
"type": "string",
"default": ""
},
{
"key": "purgeFromStage",
"name": "Purge events from stage after copying?",
"type": "choice",
"choices": ["No", "Yes"],
"default": "No"
},
{
"key": "awsAccessKeyId",
"name": "AWS access key ID",
"type": "string",
"visible_if": [["stageToUse", "S3"]],
"required_if": [["stageToUse", "S3"]]
},
{
"key": "awsSecretAccessKey",
"name": "AWS secret access key",
"type": "string",
"secret": true,
"visible_if": [["stageToUse", "S3"]],
"required_if": [["stageToUse", "S3"]]
},
{
"key": "awsRegion",
"name": "S3 bucket region",
"type": "string",
"hint": "We recommend using the same region as your Snowflake instance.",
"visible_if": [["stageToUse", "S3"]],
"required_if": [["stageToUse", "S3"]]
},
{
"key": "storageIntegrationName",
"name": "GCS storage integration name",
"type": "string",
"hint": "Follow [these instructions](https://docs.snowflake.com/en/user-guide/data-load-gcs-config.html) to get this.",
"visible_if": [["stageToUse", "GCS"]],
"required_if": [["stageToUse", "GCS"]]
},
{
"key": "gcsCredentials",
"name": "GCS credentials file",
"type": "attachment",
"hint": "This should be a JSON file. Instructions on how to get this file can be found in [this Google Cloud Tutorial](https://cloud.google.com/bigquery/docs/reference/libraries#setting_up_authentication).",
"visible_if": [["stageToUse", "GCS"]],
"required_if": [["stageToUse", "GCS"]]
},
{
"key": "eventsToIgnore",
"name": "Events to ignore",
"type": "string",
"default": "$snapshot, $feature_flag_called",
"hint": "Comma separated list of events to ignore"
},
{
"key": "retryCopyIntoOperations",
"name": "[ADVANCED] Retry failed COPY INTO operations?",
"type": "choice",
"choices": ["Yes", "No"],
"default": "Yes",
"hint": "**Do not change this option unless you really know what you're doing!**"
},
{
"key": "debug",
"name": "DEBUG",
"type": "choice",
"choices": ["ON", "OFF"],
"default": "OFF",
"hint": "Advanced"
},
{
"key": "forceCopy",
"name": "Set `FORCE = true` when copying from the bucket?",
"type": "choice",
"choices": ["Yes", "No"],
"default": "No",
"hint": "Advanced"
}
]
}