def _source_sql(self, source_relation, filter_clause=None):
        """Get the source sql based on the type of the source specified
        """
        if not (isinstance(source_relation, Relation) or
                isinstance(source_relation, SelectStatement)):
            raise ValueError('Source Relation must be a relation or select')

        if len(self.columns()) < len(source_relation.columns()):
            raise ValueError('Source has more columns than destination')

        if isinstance(source_relation, SelectStatement):
            source_sql = '(' + source_relation.sql() + ')'
        else:
            source_sql = source_relation.full_name

        if filter_clause is not None:
            source_sql = source_sql + ' ' + filter_clause

        return source_sql
dataset/ETHPy150Open coursera/dataduct/dataduct/database/table.py/Table._source_sql/original