示例#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))
示例#2
0
文件: seeder.py 项目: yilab/dbt
 def find_csvs(self):
     return Source(self.project).get_csvs(self.project['data-paths'])
示例#3
0
 def analysis_sources(self, project):
     paths = project.get('analysis-paths', [])
     return Source(project).get_analyses(paths)
示例#4
0
 def project_schemas(self):
     source_paths = self.project.get('source-paths', [])
     return Source(self.project).get_schemas(source_paths)
示例#5
0
 def project_tests(self):
     source_paths = self.project.get('test-paths', [])
     return Source(self.project).get_tests(source_paths)
示例#6
0
 def get_archives(self, project):
     archive_template = dbt.templates.ArchiveInsertTemplate()
     return Source(project,
                   own_project=project).get_archives(archive_template)
示例#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)
示例#8
0
 def get_archives(self, project):
     return Source(project, own_project=project).get_archives()
示例#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)