Skip to content

Commit

Permalink
Add available bq check in download
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesus89 committed Dec 19, 2019
1 parent ca12d83 commit a5a798b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cartoframes/data/observatory/catalog/entity.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pandas as pd

from abc import ABC
from carto import CartoException

from ...clients.bigquery_client import BigQueryClient
from ....core.logger import log
Expand Down Expand Up @@ -107,6 +108,9 @@ def _get_print_id(self):
return self.id

def _download(self, file_path, credentials):
if not self._is_available_in('bq'):
raise CartoException('{} is not ready for Download. Please, contact us for more information.'.format(self))

bq_client = _get_bigquery_client(credentials)

full_remote_table_name = self._get_remote_full_table_name(
Expand Down

0 comments on commit a5a798b

Please sign in to comment.