コード例 #1
0
ファイル: impl.py プロジェクト: jakebiesinger/dbt
    def _make_match_kwargs(self, schema, identifier):
        quoting = self.config.quoting
        if identifier is not None and quoting['identifier'] is False:
            identifier = identifier.lower()

        if schema is not None and quoting['schema'] is False:
            schema = schema.lower()

        return filter_null_values({'identifier': identifier, 'schema': schema})
コード例 #2
0
ファイル: impl.py プロジェクト: ParthRaj22/dbt-1
    def check_schema_exists(self, database, schema, model_name=None):
        """Check if a schema exists.

        The default implementation of this is potentially unnecessarily slow,
        and adapters should implement it if there is an optimized path (and
        there probably is)
        """
        search = (s.lower() for s in self.list_schemas(database=database,
                                                       model_name=model_name))
        return schema.lower() in search
コード例 #3
0
ファイル: impl.py プロジェクト: mdmartinez/dbt
    def _make_match_kwargs(cls, project_cfg, schema, identifier):
        if identifier is not None and \
           project_cfg.get('quoting', {}).get('identifier') is False:
            identifier = identifier.lower()

        if schema is not None and \
           project_cfg.get('quoting', {}).get('schema') is False:
            schema = schema.lower()

        return filter_null_values({'identifier': identifier, 'schema': schema})
コード例 #4
0
ファイル: impl.py プロジェクト: analyst-collective/dbt
    def check_schema_exists(self, database, schema, model_name=None):
        """Check if a schema exists.

        The default implementation of this is potentially unnecessarily slow,
        and adapters should implement it if there is an optimized path (and
        there probably is)
        """
        search = (
            s.lower() for s in
            self.list_schemas(database=database, model_name=model_name)
        )
        return schema.lower() in search
コード例 #5
0
ファイル: impl.py プロジェクト: analyst-collective/dbt
    def _make_match_kwargs(self, database, schema, identifier):
        quoting = self.config.quoting
        if identifier is not None and quoting['identifier'] is False:
            identifier = identifier.lower()

        if schema is not None and quoting['schema'] is False:
            schema = schema.lower()

        if database is not None and quoting['schema'] is False:
            database = database.lower()

        return filter_null_values({
            'database': database,
            'identifier': identifier,
            'schema': schema,
        })