Skip to content

Commit

Permalink
Merge pull request #61 from flash716/stream-alias
Browse files Browse the repository at this point in the history
Add stream_alias to Catalog.to_dict
  • Loading branch information
nick-mccoy authored Dec 13, 2017
2 parents bdbd776 + 219b8eb commit c5182e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions singer/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ def to_dict(self):
result['stream'] = self.stream
if self.row_count is not None:
result['row_count'] = self.row_count
if self.stream_alias is not None:
result['stream_alias'] = self.stream_alias
if self.metadata is not None:
result['metadata'] = self.metadata
return result
Expand Down
2 changes: 2 additions & 0 deletions tests/test_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class TestToDictAndFromDict(unittest.TestCase):
{
'stream': 'users',
'tap_stream_id': 'prod_users',
'stream_alias': 'users_alias',
'database_name': 'prod',
'table_name': 'users',
'schema': {
Expand Down Expand Up @@ -42,6 +43,7 @@ class TestToDictAndFromDict(unittest.TestCase):
CatalogEntry(
stream='users',
tap_stream_id='prod_users',
stream_alias='users_alias',
database='prod',
table='users',
schema=Schema(
Expand Down

0 comments on commit c5182e9

Please sign in to comment.