        """
        Executes Query in the database.
        :param query: str - query to be executed.
        :param params: list - list of parameters to be used if necessary in query
        :return: result of query
        """
        if params is not None:
            query = query.format(*params)

        return self.spark.sql(query)

    def __generate_url__(self):
        """
        This method creates the database url with all options for connect to the database