scraperwiki / odata-tool

Access your ScraperWiki data in tools like Tableau, QlikView and Excel Power Query
3 stars 0 forks source link

Support for column names with spaces or non-ascii characters #2

Closed zarino closed 10 years ago

zarino commented 10 years ago

Right now, column names must be suitable for becoming an XML element (ie: no spaces and very little punctuation). While this is fine for ScraperWiki-made tools (which use sensible column names), this might not be the case for all user-made databases. So we should clean up column names before using them as XML tags.

<m:properties>
  <d:type m:type="Edm.String">Playlist</d:type>
  <d:id m:type="Edm.Int32">16977</d:id>
  <d:rowid m:type="Edm.Int32">66</d:rowid>
  <d:name m:type="Edm.String">War of the Worlds</d:name>
</m:properties>
IanHopkinson commented 10 years ago

Encountered this in the wild on the first dataset I tried!

drj11 commented 10 years ago

Just to make it a bit clearer for me, in this case the (namedspaced) tags: "type", "id", "rowid", and "name" come from the column name of a sqlite database, is that right?

zarino commented 10 years ago

@drj11 Yes. They are the SQL column names.