Table Functions

Table functions are methods for constructing tables.

You can use table functions in:

  • FROM clause of the SELECT query.

    1. The method for creating a temporary table that is available only in the current query. The table is deleted when the query finishes.
  • CREATE TABLE AS \<table_function()> query.

    1. It's one of the methods of creating a table.

Warning

You can’t use table functions if the allow_ddl setting is disabled.

FunctionDescription
fileCreates a File-engine table.
mergeCreates a Merge-engine table.
numbersCreates a table with a single column filled with integer numbers.
remoteAllows you to access remote servers without creating a Distributed-engine table.
urlCreates a Url-engine table.
mysqlCreates a MySQL-engine table.
jdbcCreates a JDBC-engine table.
odbcCreates a ODBC-engine table.
hdfsCreates a HDFS-engine table.
s3Creates a S3-engine table.

Original article