Skip to content

Commit

Permalink
Make language codes SQL-friendly
Browse files Browse the repository at this point in the history
ScraperWiki doesn't like column names like 'en-gb', so transform them to
'en_gb' instead.
  • Loading branch information
tmtmtmtm committed Dec 14, 2016
1 parent ca25587 commit 35f7c50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scraper.rb
Expand Up @@ -33,7 +33,7 @@ def base_data
end

def names
labels.map { |k, v| ["name__#{k}", v[:value]] }.to_h
labels.map { |k, v| ["name__#{k.to_s.gsub('-','_')}", v[:value]] }.to_h
end

def unknown_properties
Expand Down

0 comments on commit 35f7c50

Please sign in to comment.