Skip to content

Commit

Permalink
export_tsv raises NotImplementedError if necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
Deep Ganguli committed Feb 13, 2014
1 parent d8bc3a7 commit ba18670
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
*.pyc
test.py
pydruid/bard.py
.idea/
6 changes: 3 additions & 3 deletions pydruid/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ def export_tsv(self, dest_path):
header = self.result[0]['event'].keys()
header.append('timestamp')
header.append('version')
else:
raise NotImplementedError('TSV export not implemented for query type: {0}'.format(self.query_type))

tsv_file.writerow(header)

Expand Down Expand Up @@ -123,9 +125,7 @@ def export_pandas(self):
for v in self.result]
nres = [dict(v) for v in nres]
else:
raise NotImplementedError(
'Pandas export not implemented for query type: {0}'
.format(self.query_type))
raise NotImplementedError('Pandas export not implemented for query type: {0}'.format(self.query_type))

df = pandas.DataFrame(nres)
return df
Expand Down

0 comments on commit ba18670

Please sign in to comment.