Exemplo n.º 1
0
    def execute(self):
        """
        execute all statements and Tables as a batch.

        .. note::
            The added statements and Tables will be cleared when executing this method.

        :return: execution result.
        """
        self._t_env._before_execute()
        return TableResult(self._j_statement_set.execute())
Exemplo n.º 2
0
    def execute(self):
        """
        Collects the contents of the current table local client.

        Example:
        ::

            >>> tab.execute()

        :return: The content of the table.
        """
        self._t_env._before_execute()
        return TableResult(self._j_table.execute())
Exemplo n.º 3
0
    def execute(self) -> 'TableResult':
        """
        Collects the contents of the current table local client.

        Example:
        ::

            >>> tab.execute()

        :return: The content of the table.

        .. versionadded:: 1.11.0
        """
        self._t_env._before_execute()
        return TableResult(self._j_table.execute())
Exemplo n.º 4
0
    def execute_insert(self, table_path, overwrite=False):
        """
        Writes the :class:`~pyflink.table.Table` to a :class:`~pyflink.table.TableSink` that was
        registered under the specified name, and then execute the insert operation.
        For the path resolution algorithm see :func:`~TableEnvironment.use_database`.

        Example:
        ::

            >>> tab.execute_insert("sink")

        :param table_path: The path of the registered :class:`~pyflink.table.TableSink` to which
               the :class:`~pyflink.table.Table` is written.
        :type table_path: str
        :param overwrite: The flag that indicates whether the insert should overwrite
               existing data or not.
        :type overwrite: bool
        :return: The table result.
        """
        self._t_env._before_execute()
        return TableResult(self._j_table.executeInsert(table_path, overwrite))