Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1 from transferwise/row-count-view
Browse files Browse the repository at this point in the history
Row count view
  • Loading branch information
koszti authored Jul 4, 2019
2 parents f1df919 + 61ffdef commit 721a3db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from setuptools import setup

setup(name='pipelinewise-tap-snowflake',
version='1.0.1',
version='1.0.2',
description='Singer.io tap for extracting data from Snowflake - PipelineWise compatible',
author="TransferWise",
url='https://github.com/transferwise/pipelinewise-tap-postgres',
Expand Down
3 changes: 2 additions & 1 deletion tap_snowflake/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ def discover_catalog(snowflake_conn, config):
table_schema in table_info[table_catalog] and
table_name in table_info[table_catalog][table_schema]
):
row_count = table_info[table_catalog][table_schema][table_name].get('row_count')
# Row Count of views returns NULL - Transform it to not null integer by defaults to 0
row_count = table_info[table_catalog][table_schema][table_name].get('row_count', 0) or 0
is_view = table_info[table_catalog][table_schema][table_name]['is_view']

md_map = metadata.write(md_map, (), 'row-count', row_count)
Expand Down

0 comments on commit 721a3db

Please sign in to comment.