-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathTable-Valued Functions.sql
More file actions
34 lines (24 loc) · 961 Bytes
/
Table-Valued Functions.sql
File metadata and controls
34 lines (24 loc) · 961 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
-- Databricks notebook source
-- MAGIC %md # Table-Valued Functions
-- MAGIC
-- MAGIC [The Internals of Spark SQL](https://books.japila.pl/spark-sql-internals/table-valued-functions/)
-- COMMAND ----------
-- MAGIC %python
-- MAGIC
-- MAGIC import os
-- MAGIC print('DATABRICKS_RUNTIME_VERSION:', os.environ.get('DATABRICKS_RUNTIME_VERSION', '(undefined)'))
-- COMMAND ----------
-- MAGIC %scala
-- MAGIC
-- MAGIC import org.apache.spark.sql.catalyst.analysis.TableFunctionRegistry
-- MAGIC display(TableFunctionRegistry.builtin.listFunction.map(_.funcName).sorted.toDF("Table-Valued Function"))
-- COMMAND ----------
-- MAGIC %fs mkdirs /tmp/jacek-laskowski
-- COMMAND ----------
select * from read_files("/tmp/jacek-laskowski")
-- COMMAND ----------
-- MAGIC %md
-- MAGIC
-- MAGIC ## Databricks TVFs
-- MAGIC
-- MAGIC [Alphabetical list of built-in functions](https://docs.databricks.com/en/sql/language-manual/sql-ref-functions-builtin-alpha.html)