-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathINPUT_SCHEMA.json
More file actions
135 lines (135 loc) · 6.64 KB
/
INPUT_SCHEMA.json
File metadata and controls
135 lines (135 loc) · 6.64 KB
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
{
"title": "Spreadsheet import input",
"type": "object",
"schemaVersion": 1,
"required": [],
"properties": {
"oAuthAccount.eFPUdxsL7X2cdSvE2": {
"title": "Google Account Id",
"description": "Google Account Id",
"type": "string",
"editor": "textfield"
},
"sheetId.eFPUdxsL7X2cdSvE2": {
"title": "Spreadsheet ID",
"description": "Spreadsheet from where the old data will be loaded",
"type": "string",
"editor": "textfield"
},
"mode": {
"title": "Mode",
"type": "string",
"description": "What should the actor do",
"enum": ["append", "replace", "modify", "read", "load backup"],
"default": "append"
},
"datasetId": {
"title": "Dataset ID",
"type": "string",
"description": "Dataset ID where the new data will be loaded from",
"editor": "resourcePicker",
"resourceType": "dataset",
"resourcePermissions": ["READ"],
"sectionCaption": "Input data",
"sectionDescription": "Only fill in for `append` or `replace` mode. Choose either `Dataset ID` or `Raw data`. Limit and offset is optional."
},
"rawData": {
"title": "Raw data",
"type": "array",
"description": "Raw data JSON array. Can be array of arrays for direct row import or arrays of objects.",
"editor": "json"
},
"limit": {
"title": "Limit items",
"type": "integer",
"description": "Number of items to take from the dataset. The default is 250000.",
"unit": "items",
"minimum": 0,
"default": 250000
},
"offset": {
"title": "Offset items",
"type": "integer",
"description": "Number of items to skip from the dataset. Default is 0.",
"unit": "items",
"minimum": 0,
"default": 0
},
"deduplicateByField": {
"title": "Deduplicate by field",
"type": "string",
"description": "Items will be deduplicated by a value of this field. Cannot be used together with 'Deduplicate by equality' or 'Transform function'.",
"editor": "textfield",
"sectionCaption": "Deduplication and transformation",
"sectionDescription": "Choose up to one way to deduplicate or transform your data."
},
"deduplicateByEquality": {
"title": "Deduplicate by equality",
"type": "boolean",
"description": "Items will be deduplicated if they are the same. Cannot be used together with 'Deduplicate by field' or 'Transform function'."
},
"transformFunction": {
"title": "Transform function",
"type": "string",
"description": "Custom function that will take new items and old items arrays as parameters and produces final array that will be imported. Cannot be used together with 'Deduplicate by equality' or 'Deduplicate by field'",
"editor": "javascript",
"prefill": "// Uncomment this code only if you don't use \"Deduplicate by field\" or \"Deduplicate by equality\"\n// This code behaves as if there was no transform function\n/*({ spreadsheetData, datasetData }) => {\n return spreadsheetData.concat(datasetData);\n}*/"
},
"range": {
"title": "Range",
"type": "string",
"description": "Range of the spreadsheet in A1 notation where the actor should operate. Default is the first sheet.",
"editor": "textfield",
"sectionCaption": "Miscellaneous"
},
"columnsOrder": {
"title": "Columns order",
"type": "array",
"description": "Array of keys. First sorts the columns by provided keys. The rest is sorted alphabetically.",
"editor": "stringList"
},
"keepSheetColumnOrder": {
"title": "Keep column order from sheet",
"type": "boolean",
"description": "If true, keeps the order of columns as they are in the sheet. If there is no sheet data yet, this does nothing."
},
"createBackup":{
"title": "Create backup",
"type": "boolean",
"description": "Old rows from your spreadsheet will be saved to the default key-value store before importing new rows."
},
"backupStore": {
"title": "Backup store id",
"type": "string",
"description": "Id of the key-value store where the backup you want to load is located. Can only be used if mode is 'load-backup'",
"editor": "textfield"
},
"spreadsheetId": {
"title": "Spreadsheet ID (deprecated)",
"type": "string",
"description": "Id of the spreadsheet from where the old data will be loaded",
"editor": "textfield",
"sectionCaption": "Deprecated Auth options",
"sectionDescription": "If you are a new user, you should skip this section and use the 'Connect Google Account to your Actor' and 'Select file from Google Drive' inputs instead.\n\n This section is only intended for users who already authorized with the old version (where authorization happened using the Live View tab during the Actor run. If you are one of these users, you can keep using the Spreadsheet ID input and it should continue to work long-term. However, you can always switch to the new official authorization inputs which have preference over the old auth."
},
"publicSpreadsheet": {
"title": "Public spreadsheet (read-only)",
"type": "boolean",
"description": "If checked, you don't need to authorize. You have to publish your spreadsheet and it works only in read mode",
"default": false
},
"tokensStore": {
"title": "Google OAuth tokens store (deprecated)",
"type": "string",
"description": "Key-value store where your Google OAuth tokens will be stored so you don't have to authorize every time again. By default it is google-oauth-tokens",
"editor": "textfield",
"default": "google-oauth-tokens"
},
"googleCredentials": {
"title": "Google Developer Console credentials",
"type": "object",
"description": "If you want to use this actor locally or with your own version, you have to provide your own credentials. Check actor readme for more information.",
"editor": "json"
}
}
}