Exemplo n.º 1
0
 def get_paths(self):
     # TODO: In order to support this, make FilesystemSearcher accept a list
     # of file patterns. eg: ['.yml', '.yaml']
     yaml_files = list(
         FilesystemSearcher(self.project, self.project.all_source_paths,
                            '.yaml'))
     if yaml_files:
         warn_or_error(
             'A future version of dbt will parse files with both'
             ' .yml and .yaml file extensions. dbt found'
             f' {len(yaml_files)} files with .yaml extensions in'
             ' your dbt project. To avoid errors when upgrading'
             ' to a future release, either remove these files from'
             ' your dbt project, or change their extensions.')
     return FilesystemSearcher(self.project, self.project.all_source_paths,
                               '.yml')
Exemplo n.º 2
0
 def get_paths(self) -> List[FilePath]:
     return list(
         FilesystemSearcher(
             project=self.project,
             relative_dirs=self.project.macro_paths,
             extension='.sql',
         ))
Exemplo n.º 3
0
def get_source_files(project, paths, extension, parse_file_type):
    # file path list
    fp_list = list(FilesystemSearcher(project, paths, extension))
    # file block list
    fb_list = []
    for fp in fp_list:
        if parse_file_type == ParseFileType.Seed:
            fb_list.append(load_seed_source_file(fp, project.project_name))
        else:
            fb_list.append(
                load_source_file(fp, parse_file_type, project.project_name))
    return fb_list
Exemplo n.º 4
0
 def get_paths(self):
     return FilesystemSearcher(
         project=self.project,
         relative_dirs=self.project.macro_paths,
         extension='.sql',
     )
Exemplo n.º 5
0
 def get_paths(self):
     return FilesystemSearcher(self.project, self.project.analysis_paths,
                               '.sql')
Exemplo n.º 6
0
 def get_paths(self):
     return FilesystemSearcher(self.project, self.project.source_paths,
                               '.yml')
Exemplo n.º 7
0
 def get_paths(self):
     return FilesystemSearcher(self.project, self.project.data_paths,
                               '.csv')
Exemplo n.º 8
0
 def get_paths(self):
     return FilesystemSearcher(
         project=self.project,
         relative_dirs=self.project.docs_paths,
         extension='.md',
     )
Exemplo n.º 9
0
 def get_paths(self):
     return FilesystemSearcher(
         self.project, self.project.snapshot_paths, '.sql'
     )