five

Data Utilities

收藏
Snowflake2023-10-27 更新2024-05-01 收录
下载链接:
https://app.snowflake.com/marketplace/listing/GZTSZ290BUX44
下载链接
链接失效反馈
官方服务:
资源简介:
Data Utilities is a toolbox of functions for helping you call various services such ChatGPT, Claude, and FRED in Snowflake SQL. Functions to clean and process URLs and phone numbers within Snowflake queries are also included. **FRED Functions** ```javascript FRED_DOWNLOAD_AND_GENERATE_FOUNDATION_TABLES_FROM_SERIES(series_ids_string, output_timeseries_table, output_attributes_table)` - Stored Procedure that combines all steps: downloading data and metadata for multiple series, then generating foundation tables in one operation. FRED_GET_SERIES(series_id) - UDTF that returns FRED series data as a table. FRED_GET_SERIES_METADATA(series_id) - UDTF that returns metadata for a FRED series as a table. FRED_GENERATE_FOUNDATION_TABLES(input_series_data_table, input_series_metadata_table, output_timeseries_table, output_attributes_table)` - Stored Procedure to combine raw series data and metadata, process it, and output time series and attribute tables. ``` The FRED data and FRED API are an external offering made available by FRED, subject to FRED's [terms of use](https://fred.stlouisfed.org/legal). Your download and use, as applicable, of FRED data and the FRED API, including in connection with this product, are subject to FRED's terms. **AI Functions** ```javascript EVALUATE_OPENAI_PROMPT(model, system_prompt, user_prompt) -- Returns response from OpenAI EVALUATE_ANTHROPIC_PROMPT(model, max_tokens, system_prompt, user_prompt) -- Returns response from Anthropic TOKEN_COUNT(prompt, model) -- Returns the number of tokens in the prompt to help estimate costs ``` **Phone Number Parsing Functions** ```javascript GETPHONENUMBER(phone, country) -- Returns phone number in a national format ``` **URL Parsing Functions** ```javascript GETDOMAIN(url) -- Returns the domain with the suffix or top level domain without any URL parameters or subdomains. GETDOMAINONLY(url) -- Returns only the core domain text without any subdomain, parameters, suffix or top level domain GETPUBLICSUFFIXDOMAINONLY(url) -- Returns only the public suffix domain. Public suffixes include suffixes under which users or companies can register domains. GETSUBDOMAIN(url) -- Returns the domain in addition to the subdomain. The subdomain "www" is excluded from results GETSUBDOMAINONLY(url) -- Returns only the subdomain portion of the domain ``` **[Documentation](https://data-docs.snowflake.com/foundations/products/data-utilities/#overview)** View step by step set up instructions, examples, and additional details in [Docs](https://data-docs.snowflake.com/foundations/products/data-utilities/).
提供机构:
Snowflake Public Data Products
创建时间:
2023-10-24
5,000+
优质数据集
54 个
任务类型
进入经典数据集
二维码
社区交流群

面向社区/商业的数据集话题

二维码
科研交流群

面向高校/科研机构的开源数据集话题

数据驱动未来

携手共赢发展

商业合作