KDB.AI Cloud Setup
This page details the steps to setup KDB.AI Cloud.
Sign up
Sign up for KDB.AI Cloud here.
Log in to KDB.AI Cloud
To log in:
- Click on the link provided in your welcome email.
- Enter your username and password as created when you registered.
- Click Sign In.
Connect to your database
- In the Connection Details tab, go to Endpoint URL and copy the URL using the Copy button.
- Paste the endpoint URL into a notepad until you need it in the Connect a KDB.AI session step.
Create an API key
- To create an API key, click Add new API Key.
- Copy the key code to your clipboard. It's only visible once. Once you close this window, you can't copy the code again.
- Paste the API key into a notepad until you need it in the Connect a KDB.AI session step.
You can generate up to three API keys. If you mislay the API key code, you can delete the existing API key and then generate a new one.
Install KDB.AI client
In a command window, use the following pip command to install the latest version of the KDB.AI client:
pip install kdbai-client
KDB.AI supports Python (versions 3.8 to 3.11).
Ensure curl is installed, for example, `which curl`
Connect a KDB.AI session
Establish and verify the connection with your KDB.AI session:
import kdbai_client as kdbai
session = kdbai.Session(endpoint="https://cloud.kdb.ai/instance/{YOUR_INSTANCE_ID}", api_key="{YOUR_API_KEY}")
# create reference to default database
db = session.database('default')
Verify session
Check if your connection has been successful using the list
function:
print(db.tables)
An empty list [] should be returned as you haven't created any tables yet.
Troubleshooting: Deactivated account due to inactivity
Warning
If you do not create a table within 7 days after creating your account, your instance becomes inactive. This means that after you log into your account, you'll notice a red No database tag at the top of your KDB.AI Cloud profile.
To activate a new instance, click on the Request a new database button. Instances are allocated on a first-come, first-served basis:
- If you don't get one right away, it's because no new instances are available at that moment; you'll receive a "Your database is queued" email.
- As soon as a new instance is available, you'll receive an email titled Your database is ready.
- Refresh your KDB.AI Cloud account homepage to access your newly-allocated instance.
Next steps
- Go to our Quickstart Guide page to set up your table schema and start inserting data.
- If you need help, feel free to reach out to the KDB.AI Slack community or email support@kdb.ai.