Attention: The code in this repository is intended for experimental use only and is not fully tested, documented, or supported by SingleStore. Visit the SingleStore Forums to ask questions about this repository.
This repo includes a standalone demonstration of using SingleStore external functions. External functions allow you to define a user defined function in SingleStore which, when executed, will call out to an externally defined web service.
SingleStore is a scale out relational database optimized for transactions and analytics. This is just one of many extensibility options that SingleStore offers to help it run your workload. You can run SingleStore yourself or use our cloud offering (sign up here for $500 in credits!).
- Sign up for a SingleStore account and get your license key from the customer portal.
- Add the license key to your shell environment:
export SINGLESTORE_LICENSE="YOUR LICENSE KEY HERE"
- Run
docker-compose up --build
in this directory, check the logs for errors - Open SingleStore Studio in your browser
- Login using the username
root
and passwordtest
- Navigate to the SQL Editor
- Run the following SQL commands line by line:
use test; -- let's first make sure it works select * from tokenize("Cool! External functions work!"); -- we can extract just the tokens select encoded::tokens from tokenize("Cool! External functions work!"); -- now let's join it with a table select id, encoded::tokens from sample_data, tokenize(sample_data.t);