Esempio n. 1
0
    def model_sources(self, this_project, own_project=None):
        if own_project is None:
            own_project = this_project

        paths = own_project.get('source-paths', [])
        if self.create_template.label == 'build':
            return Source(this_project, own_project=own_project).get_models(paths, self.create_template)
        elif self.create_template.label == 'test':
            return Source(this_project, own_project=own_project).get_test_models(paths, self.create_template)
        elif self.create_template.label == 'archive':
            return []
        else:
            raise RuntimeError("unexpected create template type: '{}'".format(self.create_template.label))
Esempio n. 2
0
File: seeder.py Progetto: yilab/dbt
 def find_csvs(self):
     return Source(self.project).get_csvs(self.project['data-paths'])
Esempio n. 3
0
 def analysis_sources(self, project):
     paths = project.get('analysis-paths', [])
     return Source(project).get_analyses(paths)
Esempio n. 4
0
 def project_schemas(self):
     source_paths = self.project.get('source-paths', [])
     return Source(self.project).get_schemas(source_paths)
Esempio n. 5
0
 def project_tests(self):
     source_paths = self.project.get('test-paths', [])
     return Source(self.project).get_tests(source_paths)
Esempio n. 6
0
 def get_archives(self, project):
     archive_template = dbt.templates.ArchiveInsertTemplate()
     return Source(project,
                   own_project=project).get_archives(archive_template)
Esempio n. 7
0
 def get_macros(self, this_project, own_project=None):
     if own_project is None:
         own_project = this_project
     paths = own_project.get('macro-paths', [])
     return Source(this_project, own_project=own_project).get_macros(paths)
Esempio n. 8
0
 def get_archives(self, project):
     return Source(project, own_project=project).get_archives()
Esempio n. 9
0
    def model_sources(self, this_project, own_project=None):
        if own_project is None:
            own_project = this_project

        paths = own_project.get('source-paths', [])
        return Source(this_project, own_project=own_project).get_models(paths)