Prerequisites
Before you connect, you must first do the following:- Connect a data source to your Connect AI account. See Sources for more information.
- Generate a Personal Access Token (PAT) on the Settings page. Copy this down, as it acts as your password during authentication.
Connect to Connect AI with Axios
In your project directory, create a file called
server.js that contains the following code. Provide your Connect AI username and pat (the PAT you created in the prerequisites). You must also provide a query for your data, such as SELECT * FROM Snowflake1.PUBLIC.Accounts.