Trying out the new Databin product in the Wolfram Cloud.
I have a simple ,-delimited .csv file with a header row which I have imported using the follwing:
apps = SemanticImport["ListOfAppsWithAttributes.csv", Automatic, "Dataset", HeaderLines ->1]
Simple calls such as
apps[Total, "StorageDemand"] work just fine.
I would now like to export/write this dataset to the Databin.
theBin = CreateDatabin Export[theBin,apps]
However I get the following error:
Export:chtype: First argument Databin[...] is not a valid file specification.
DatabinAdd[theBin, apps] will also throw an error:
Databin:apperr: An API must be specified.
Any suggestions on how to export/write a dataset to a databin in a short/direct way?
-------- EDIT (post 'on hold' decision) --------
This is to share the outcome of a follow-up investigation on the topic.
Dislaimer: Wolfram's DataDrop and with it the Databin command as part of the Wolfram Language are being pushed as extensions of Mathematica. Hence the posting in this forum.
the issues I have encountered where with
- the dataset's cleanliness
- the need to RTFM on setting adequate parameters for SemanticImport to begin with, and
- also some other (c) observations worth sharing around the 'behaviour' of the Databin interface.
- ~2900 rows with approx 100 columns.
- Originally managed in Excel, then exported to .csv Many cells had ',' in them which had to be cleaned up. Not doing so skewed the loads drastically and obviously produces the wrong outcome.
- Several cells had UTF-8 characters in it which created additional noise.
The code which worked in principle after fixing the file:
apps = SemanticImport["DataFilesFullset/Index_AllRows_AllColumns.csv", Automatic, "Dataset", Delimiters -> ",", HeaderLines ->1, CharacterEncoding -> "ASCII"]; theBin = CreateDatabin For[i = 1, i< 2000, i++, DatabinAdd[theBin,apps[i]]]
The for loop was inserted to ensure that the size limit on Databin items (25kb by default) is not exceeded.
Additional points to note though on the loading of the Dataset subsequently into the Databin. The DataDrop platform enforces ingestion and compute ceilings which you may need to take note of when attempting to load 'lots' of data in relatively short time.
I hope this additional info is useful for future readers of this page. The question as such though should be closed.