URL table function
BETA
¶The Tinybird url()
table function is currently in private beta. If you're interested in early access, reach out to support.
The Tinybird url()
table function allows you to read data from an existing URL into Tinybird, then schedule a regular Copy Pipe to orchestrate synchronization. You can load full tables, and every run performs a full replace on the Data Source.
To use it, define a node using standard SQL and the url
function keyword, then publish the node as a Copy Pipe that does a sync on every run. See Table functions for general information and tips.
Syntax¶
Create a new Pipe Node. Call the url
table function and pass the URL. Optionally, pass the format and the structure:
Example query logic
SELECT JSONExtractString(data, 'article') AS article, JSONExtractInt(data, 'views') AS views, JSONExtractInt(data, 'rank') AS rank FROM ( SELECT toJSONString(arrayJoin(items.articles)) AS data FROM url( 'https://wikimedia.org/api/rest_v1/metrics/pageviews/top/en.wikipedia.org/all-access/2024/03/all-days', 'JSONColumns', 'items Tuple(access Nullable(String), articles Array(Tuple(article Nullable(String), rank Nullable(Int64), views Nullable(Int64))), day Nullable(String), month Nullable(String), project Nullable(String), year Nullable(String))' ) )
Publish this node as a Copy Pipe. You can choose to append only new data or replace all data.