-
-
Save aficionado/3c9bcfbb58bd2166c55984c8965a2ab9 to your computer and use it in GitHub Desktop.
One-Click Dataset from a Source
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "One-Click Dataset", | |
"description": "Create a new dataset from a source with a click", | |
"outputs": [ | |
{"name": "dataset-id", "type": "dataset-id", "description": "The new dataset"}, | |
{"name": "rows", "type": "number", "description": "The number of rows of the new dataset"} | |
], | |
"parameters": [ | |
{"name": "source-id", "type": "source-id", "default": "", "description": "Source from which to create a new dataset"}, | |
{"name": "source-name", "type": "string", "default": "", "description": "Name for the new dataset"} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define (make-dataset id name) | |
(let (ds-id (create-and-wait-dataset {"source" id | |
"name" name})) | |
(fetch ds-id))) | |
(define dataset (make-dataset source-id source-name)) | |
(define dataset-id (get dataset "resource")) | |
(define rows (get dataset "rows")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment