bigquery_validator/bigquery_validator.py
def validate_query_from_file(self, file_path):
        """Same as validate_query() but reads query from a file rather than accepting it as a param

        Parameters:
        file_path (str): Path to the sql file on the file system
        """
        try:
            # todo check if file ends with .sql
            if os.path.isfile(file_path):
                templated_query = read_sql_file(file_path)
                return self.validate_query(templated_query)
            else:
                raise ValueError(f'Error: File does not exist: {file_path}')
        except Exception as e:
            logging.error(e)
            return False
Same as validate_query() but reads query from a file rather than accepting it as a param

        Parameters:
        file_path (str): Path to the sql file on the file system
        
Same as validate_query() but reads query from a file rather than accepting it as a param
Parameters:
file_path (str): Path to the sql file on the file system
Same as validate_query () but reads query from a file rather than accepting it as a param Parameters : file_path ( str ) : Path to the sql file on the file system
def validate_query_from_file(self, file_path):
        try:
            if os.path.isfile(file_path):
                templated_query = read_sql_file(file_path)
                return self.validate_query(templated_query)
            else:
                raise ValueError(f'Error: File does not exist: {file_path}')
        except Exception as e:
            logging.error(e)
            return False
def validate_query_from_file ( self , file_path ) : try : if os . path . isfile ( file_path ) : templated_query = read_sql_file ( file_path ) return self . validate_query ( templated_query ) else : raise ValueError ( f'Error: File does not exist: {file_path}' ) except Exception as e : logging . error ( e ) return False
Same as validate_query() but reads query from a file rather than accepting it as a param
Parameters:
file_path (str): Path to the sql file on the file system
Same as validate_query () but reads query from a file rather than accepting it as a param Parameters : file_path ( str ) : Path to the sql file on the file system
"""Same as validate_query() but reads query from a file rather than accepting it as a param

        Parameters:
        file_path (str): Path to the sql file on the file system
        """ # todo check if file ends with .sql
self
file_path