Snowflake Uploader avatar

Snowflake Uploader

Try for free

No credit card required

Go to Store
Snowflake Uploader

Snowflake Uploader

svpetrenko/snowflake-uploader
Try for free

No credit card required

This actor uploads Apify datasets to Snowflake tables. You can use it with in a combination with webhooks to integrate your scrapers with Snowflake.

You can access the Snowflake Uploader programmatically from your own applications by using the Apify API. You can choose the language preference from below. To use the Apify API, you’ll need an Apify account and your API token, found in Integrations settings in Apify Console.

1{
2  "openapi": "3.0.1",
3  "info": {
4    "version": "0.0",
5    "x-build-id": "YO4INN8Fq0pDkjRmQ"
6  },
7  "servers": [
8    {
9      "url": "https://api.apify.com/v2"
10    }
11  ],
12  "paths": {
13    "/acts/svpetrenko~snowflake-uploader/run-sync-get-dataset-items": {
14      "post": {
15        "operationId": "run-sync-get-dataset-items-svpetrenko-snowflake-uploader",
16        "x-openai-isConsequential": false,
17        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
18        "tags": [
19          "Run Actor"
20        ],
21        "requestBody": {
22          "required": true,
23          "content": {
24            "application/json": {
25              "schema": {
26                "$ref": "#/components/schemas/inputSchema"
27              }
28            }
29          }
30        },
31        "parameters": [
32          {
33            "name": "token",
34            "in": "query",
35            "required": true,
36            "schema": {
37              "type": "string"
38            },
39            "description": "Enter your Apify token here"
40          }
41        ],
42        "responses": {
43          "200": {
44            "description": "OK"
45          }
46        }
47      }
48    },
49    "/acts/svpetrenko~snowflake-uploader/runs": {
50      "post": {
51        "operationId": "runs-sync-svpetrenko-snowflake-uploader",
52        "x-openai-isConsequential": false,
53        "summary": "Executes an Actor and returns information about the initiated run in response.",
54        "tags": [
55          "Run Actor"
56        ],
57        "requestBody": {
58          "required": true,
59          "content": {
60            "application/json": {
61              "schema": {
62                "$ref": "#/components/schemas/inputSchema"
63              }
64            }
65          }
66        },
67        "parameters": [
68          {
69            "name": "token",
70            "in": "query",
71            "required": true,
72            "schema": {
73              "type": "string"
74            },
75            "description": "Enter your Apify token here"
76          }
77        ],
78        "responses": {
79          "200": {
80            "description": "OK",
81            "content": {
82              "application/json": {
83                "schema": {
84                  "$ref": "#/components/schemas/runsResponseSchema"
85                }
86              }
87            }
88          }
89        }
90      }
91    },
92    "/acts/svpetrenko~snowflake-uploader/run-sync": {
93      "post": {
94        "operationId": "run-sync-svpetrenko-snowflake-uploader",
95        "x-openai-isConsequential": false,
96        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
97        "tags": [
98          "Run Actor"
99        ],
100        "requestBody": {
101          "required": true,
102          "content": {
103            "application/json": {
104              "schema": {
105                "$ref": "#/components/schemas/inputSchema"
106              }
107            }
108          }
109        },
110        "parameters": [
111          {
112            "name": "token",
113            "in": "query",
114            "required": true,
115            "schema": {
116              "type": "string"
117            },
118            "description": "Enter your Apify token here"
119          }
120        ],
121        "responses": {
122          "200": {
123            "description": "OK"
124          }
125        }
126      }
127    }
128  },
129  "components": {
130    "schemas": {
131      "inputSchema": {
132        "type": "object",
133        "required": [
134          "username",
135          "account",
136          "password",
137          "warehouse",
138          "database",
139          "tableName"
140        ],
141        "properties": {
142          "datasetId": {
143            "title": "Dataset ID",
144            "type": "string",
145            "description": "Dataset of the ID to download the data from. If you set up a webhook, it will be posted in the default payload"
146          },
147          "tableName": {
148            "title": "Fully-qualified table name",
149            "type": "string",
150            "description": "Table name in the format DATABASE.SCHEMA.TABLENAME"
151          },
152          "username": {
153            "title": "Connection username",
154            "type": "string",
155            "description": "Your acount's username"
156          },
157          "account": {
158            "title": "Account name",
159            "type": "string",
160            "description": "Account name. You can get it from the url, it's usually a set of letters and is not the same as your username."
161          },
162          "password": {
163            "title": "Password",
164            "type": "string",
165            "description": "Your account's password"
166          },
167          "database": {
168            "title": "Database name",
169            "type": "string",
170            "description": "Your database's name."
171          },
172          "warehouse": {
173            "title": "Warehouse",
174            "type": "string",
175            "description": "Supply your custom warehouse name if you want. The deault works fine as well.",
176            "default": "COMPUTE_WH"
177          },
178          "stage": {
179            "title": "Stage",
180            "type": "string",
181            "description": "Supply name of the stage where the file with data will be uploaded (with PUT). If you don't specify this, your table's default stage will be used."
182          },
183          "flattenJson": {
184            "title": "Flatten JSON",
185            "type": "boolean",
186            "description": "If you select this option, instead of {a: {b: 1, c: [1, 2]}} you'll get {a.b: 1, a.c.0: 1, a.c.1: 2}",
187            "default": false
188          },
189          "transformJsonKeyFunction": {
190            "title": "Transform JSON key function",
191            "type": "string",
192            "description": "Runs after flattening JSON. Enter body of a function that will transform JSON keys of dataset objecs. You have access to 'key' argument and must return a string. Example: 'return key.toLowerCase()'"
193          },
194          "transformJsonDataFunction": {
195            "title": "Transform JSON data function",
196            "type": "string",
197            "description": "Runs after transforming keys. Enter the body of a function that will transform dataset objecs. You have access to 'value' argument that is a json object from dataset and must return a(n) (un)modified value. Example: `value.name += '/'; return value`"
198          },
199          "limit": {
200            "title": "Limit rows",
201            "type": "integer",
202            "description": "Limit the number of rows to be uploaded (e.g. for testing purposes on large datasets, because you have to wait for all your dataset to get transformed before pushing anything to the db). If you don't specify this, all rows will be uploaded."
203          },
204          "overwrite": {
205            "title": "Overwrite table",
206            "type": "boolean",
207            "description": "Whether to drop the table's data before pushing dataset data into it",
208            "default": false
209          },
210          "synchronizeSchema": {
211            "title": "Database schema columns (SETTING THIS OPTION WILL DROP YOUR TABLE)",
212            "type": "array",
213            "description": "In case your destination table has a schema incompatible with the dataset, you can provide a list of column names and their types, then the table will be synchronized according to your definitions by dropping and recreating the table. Key is the column name, value is the column type (as in SQL query, like VARCHAR). This is optional if your table already has the desired schema.",
214            "items": {
215              "type": "object",
216              "required": [
217                "key",
218                "value"
219              ],
220              "properties": {
221                "key": {
222                  "type": "string",
223                  "title": "Key"
224                },
225                "value": {
226                  "type": "string",
227                  "title": "Value"
228                }
229              }
230            }
231          },
232          "dataLossConfirmation": {
233            "title": "Confirm data loss",
234            "type": "boolean",
235            "description": "If you choose to synchronize your schema or overwrite previous data, check this checkbox to confirm that you agree to lose your previous data",
236            "default": false
237          },
238          "fileUploadRetries": {
239            "title": "File upload retries",
240            "type": "integer",
241            "description": "How many times to retry uploading the file to Snowflake. This setting is useful because this last operation sometimes fails for large datasets due to snoflake's driver",
242            "default": 5
243          }
244        }
245      },
246      "runsResponseSchema": {
247        "type": "object",
248        "properties": {
249          "data": {
250            "type": "object",
251            "properties": {
252              "id": {
253                "type": "string"
254              },
255              "actId": {
256                "type": "string"
257              },
258              "userId": {
259                "type": "string"
260              },
261              "startedAt": {
262                "type": "string",
263                "format": "date-time",
264                "example": "2025-01-08T00:00:00.000Z"
265              },
266              "finishedAt": {
267                "type": "string",
268                "format": "date-time",
269                "example": "2025-01-08T00:00:00.000Z"
270              },
271              "status": {
272                "type": "string",
273                "example": "READY"
274              },
275              "meta": {
276                "type": "object",
277                "properties": {
278                  "origin": {
279                    "type": "string",
280                    "example": "API"
281                  },
282                  "userAgent": {
283                    "type": "string"
284                  }
285                }
286              },
287              "stats": {
288                "type": "object",
289                "properties": {
290                  "inputBodyLen": {
291                    "type": "integer",
292                    "example": 2000
293                  },
294                  "rebootCount": {
295                    "type": "integer",
296                    "example": 0
297                  },
298                  "restartCount": {
299                    "type": "integer",
300                    "example": 0
301                  },
302                  "resurrectCount": {
303                    "type": "integer",
304                    "example": 0
305                  },
306                  "computeUnits": {
307                    "type": "integer",
308                    "example": 0
309                  }
310                }
311              },
312              "options": {
313                "type": "object",
314                "properties": {
315                  "build": {
316                    "type": "string",
317                    "example": "latest"
318                  },
319                  "timeoutSecs": {
320                    "type": "integer",
321                    "example": 300
322                  },
323                  "memoryMbytes": {
324                    "type": "integer",
325                    "example": 1024
326                  },
327                  "diskMbytes": {
328                    "type": "integer",
329                    "example": 2048
330                  }
331                }
332              },
333              "buildId": {
334                "type": "string"
335              },
336              "defaultKeyValueStoreId": {
337                "type": "string"
338              },
339              "defaultDatasetId": {
340                "type": "string"
341              },
342              "defaultRequestQueueId": {
343                "type": "string"
344              },
345              "buildNumber": {
346                "type": "string",
347                "example": "1.0.0"
348              },
349              "containerUrl": {
350                "type": "string"
351              },
352              "usage": {
353                "type": "object",
354                "properties": {
355                  "ACTOR_COMPUTE_UNITS": {
356                    "type": "integer",
357                    "example": 0
358                  },
359                  "DATASET_READS": {
360                    "type": "integer",
361                    "example": 0
362                  },
363                  "DATASET_WRITES": {
364                    "type": "integer",
365                    "example": 0
366                  },
367                  "KEY_VALUE_STORE_READS": {
368                    "type": "integer",
369                    "example": 0
370                  },
371                  "KEY_VALUE_STORE_WRITES": {
372                    "type": "integer",
373                    "example": 1
374                  },
375                  "KEY_VALUE_STORE_LISTS": {
376                    "type": "integer",
377                    "example": 0
378                  },
379                  "REQUEST_QUEUE_READS": {
380                    "type": "integer",
381                    "example": 0
382                  },
383                  "REQUEST_QUEUE_WRITES": {
384                    "type": "integer",
385                    "example": 0
386                  },
387                  "DATA_TRANSFER_INTERNAL_GBYTES": {
388                    "type": "integer",
389                    "example": 0
390                  },
391                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
392                    "type": "integer",
393                    "example": 0
394                  },
395                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
396                    "type": "integer",
397                    "example": 0
398                  },
399                  "PROXY_SERPS": {
400                    "type": "integer",
401                    "example": 0
402                  }
403                }
404              },
405              "usageTotalUsd": {
406                "type": "number",
407                "example": 0.00005
408              },
409              "usageUsd": {
410                "type": "object",
411                "properties": {
412                  "ACTOR_COMPUTE_UNITS": {
413                    "type": "integer",
414                    "example": 0
415                  },
416                  "DATASET_READS": {
417                    "type": "integer",
418                    "example": 0
419                  },
420                  "DATASET_WRITES": {
421                    "type": "integer",
422                    "example": 0
423                  },
424                  "KEY_VALUE_STORE_READS": {
425                    "type": "integer",
426                    "example": 0
427                  },
428                  "KEY_VALUE_STORE_WRITES": {
429                    "type": "number",
430                    "example": 0.00005
431                  },
432                  "KEY_VALUE_STORE_LISTS": {
433                    "type": "integer",
434                    "example": 0
435                  },
436                  "REQUEST_QUEUE_READS": {
437                    "type": "integer",
438                    "example": 0
439                  },
440                  "REQUEST_QUEUE_WRITES": {
441                    "type": "integer",
442                    "example": 0
443                  },
444                  "DATA_TRANSFER_INTERNAL_GBYTES": {
445                    "type": "integer",
446                    "example": 0
447                  },
448                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
449                    "type": "integer",
450                    "example": 0
451                  },
452                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
453                    "type": "integer",
454                    "example": 0
455                  },
456                  "PROXY_SERPS": {
457                    "type": "integer",
458                    "example": 0
459                  }
460                }
461              }
462            }
463          }
464        }
465      }
466    }
467  }
468}

Snowflake Uploader OpenAPI definition

OpenAPI is a standard for designing and describing RESTful APIs, allowing developers to define API structure, endpoints, and data formats in a machine-readable way. It simplifies API development, integration, and documentation.

OpenAPI is effective when used with AI agents and GPTs by standardizing how these systems interact with various APIs, for reliable integrations and efficient communication.

By defining machine-readable API specifications, OpenAPI allows AI models like GPTs to understand and use varied data sources, improving accuracy. This accelerates development, reduces errors, and provides context-aware responses, making OpenAPI a core component for AI applications.

You can download the OpenAPI definitions for Snowflake Uploader from the options below:

If you’d like to learn more about how OpenAPI powers GPTs, read our blog post.

You can also check out our other API clients:

Developer
Maintained by Community

Actor Metrics

  • 2 monthly users

  • 2 bookmarks

  • >99% runs succeeded

  • Created in Jan 2023

  • Modified a year ago