How to use the dbt.exceptions.NotImplementedException function in dbt

To help you get started, we’ve selected a few dbt examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github fishtown-analytics / dbt / core / dbt / adapters / sql / connections.py View on Github external
def get_status(cls, cursor):
        """Get the status of the cursor.

        :param cursor: A database handle to get status from
        :return: The current status
        :rtype: str
        """
        raise dbt.exceptions.NotImplementedException(
            '`get_status` is not implemented for this adapter!'
        )
github fishtown-analytics / dbt / core / dbt / adapters / sql / connections.py View on Github external
def cancel(self, connection):
        """Cancel the given connection.

        :param Connection connection: The connection to cancel.
        """
        raise dbt.exceptions.NotImplementedException(
            '`cancel` is not implemented for this adapter!'
        )
github fishtown-analytics / dbt / core / dbt / adapters / base / impl.py View on Github external
def list_schemas(self, database: str) -> List[str]:
        """Get a list of existing schemas in database"""
        raise dbt.exceptions.NotImplementedException(
            '`list_schemas` is not implemented for this adapter!'
        )
github fishtown-analytics / dbt / core / dbt / adapters / base / impl.py View on Github external
def list_relations_without_caching(
        self, information_schema: BaseRelation, schema: str
    ) -> List[BaseRelation]:
        """List relations in the given schema, bypassing the cache.

        This is used as the underlying behavior to fill the cache.

        :param Relation information_schema: The information schema to list
            relations from.
        :param str schema: The name of the schema to list relations from.
        :return: The relations in schema
        :rtype: List[self.Relation]
        """
        raise dbt.exceptions.NotImplementedException(
            '`list_relations_without_caching` is not implemented for this '
            'adapter!'
github fishtown-analytics / dbt / core / dbt / node_runners.py View on Github external
def after_execute(self, result):
        raise NotImplementedException()
github fishtown-analytics / dbt / core / dbt / adapters / base / impl.py View on Github external
def convert_datetime_type(
        cls, agate_table: agate.Table, col_idx: int
    ) -> str:
        """Return the type in the database that best maps to the agate.DateTime
        type for the given agate table and column index.

        :param agate_table: The table
        :param col_idx: The index into the agate table for the column.
        :return: The name of the type in the database
        """
        raise NotImplementedException(
            '`convert_datetime_type` is not implemented for this adapter!')
github fishtown-analytics / dbt / dbt / adapters / bigquery / impl.py View on Github external
def rename_relation(self, from_relation, to_relation, model_name=None):
        raise dbt.exceptions.NotImplementedException(
            '`rename_relation` is not implemented for this adapter!')
github fishtown-analytics / dbt / core / dbt / main.py View on Github external
def track_run(task):
    dbt.tracking.track_invocation_start(config=task.config, args=task.args)
    try:
        yield
        dbt.tracking.track_invocation_end(
            config=task.config, args=task.args, result_type="ok"
        )
    except (dbt.exceptions.NotImplementedException,
            dbt.exceptions.FailedToConnectException) as e:
        logger.error('ERROR: {}'.format(e))
        dbt.tracking.track_invocation_end(
            config=task.config, args=task.args, result_type="error"
        )
    except Exception:
        dbt.tracking.track_invocation_end(
            config=task.config, args=task.args, result_type="error"
        )
        raise
    finally:
        dbt.tracking.flush()
github fishtown-analytics / dbt / core / dbt / adapters / base / connections.py View on Github external
def execute(self, sql, name=None, auto_begin=False, fetch=False):
        """Execute the given SQL.

        :param str sql: The sql to execute.
        :param Optional[str] name: The name to use for the connection.
        :param bool auto_begin: If set, and dbt is not currently inside a
            transaction, automatically begin one.
        :param bool fetch: If set, fetch results.
        :return: A tuple of the status and the results (empty if fetch=False).
        :rtype: Tuple[str, agate.Table]
        """
        raise dbt.exceptions.NotImplementedException(
            '`execute` is not implemented for this adapter!'
        )
github fishtown-analytics / dbt / core / dbt / task / runnable.py View on Github external
def build_query(self):
        raise dbt.exceptions.NotImplementedException('Not Implemented')