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[]

However I get the following error:

Export:chtype: First argument Databin[...] is not a valid file specification.

Also, using 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

  1. the dataset's cleanliness
  2. the need to RTFM on setting adequate parameters for SemanticImport to begin with, and
  3. also some other (c) observations worth sharing around the 'behaviour' of the Databin interface.

The dataset:

  • ~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.

enter image description here

I hope this additional info is useful for future readers of this page. The question as such though should be closed.

closed as off-topic by MarcoB, dr.blochwave, Mr.Wizard Jul 30 '15 at 7:04

  • The question does not concern the technical computing software Mathematica by Wolfram Research. Please see the help center to find out about the topics that can be asked here.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • It would be helpful if you could post your data, for example at a site like pastebin, so others can download it and test possible solutions. – dionys Jul 29 '15 at 8:53
  • Will have to do some obfuscation before I upload publicly. But just imagine a very simple comma-delimited file: 1 st record: HeaderField1,HeaderField2... then 2nd record etc: 1234,AppName – El Architect Jul 29 '15 at 8:54
  • A minimal set of fake data is probably fine as long as it has the same structure. I guess I assumed you already had a set of toy data that you were using to test things. – dionys Jul 29 '15 at 8:57
  • Have you tried to use DatabinUpload? Although the docs for DatabinAdd mention that the added expression can be anything, the examples only show adding a single data point or an association. I also couldn't find a definitive reference showing that one can use Export with a Databin object. – MarcoB Jul 29 '15 at 11:35
  • 2
    Good to know, in a way. I'm voting to close this question. Maybe you can come back with another question when you are able to pinpoint the underlying problem with your dataset. – MarcoB Jul 30 '15 at 2:55