TechnologyApril 16, 2020

Using Glitch and the Astra Data API

Adam Locke
Adam Locke
Using Glitch and the Astra Data API
$ cd ~/.data
$ wget secure-connect-bundle-url
$ mv secure-connect-bundle-name secure-connect.zip
https://astra.datastax.com/org/{org-Id}/database/{databaseid}
{"authToken": "37396a44-dcb8-4740-a97f-79f0dba47973"}
'{"changeset":[{"column":"id","value":"e5a768fc-ffdd-49e9-a179-b491e024088a"},{"column":"address","value":"91 Dogwood Dr. Bridgeport, Connecticut (CT) 06606"},{"column":"prod_id","value":"31047029-2175-43ce-9fdd-b3d568b19bb8"},{"column":"prod_name","value":"Precision Torso"},{"column":"description","value":"Robot torso built to handle precision jobs with extra stability and accuracy reinforcement."},{"column":"price","value":8199.99},{"column":"quantity","value":3},{"column":"sell_price","value":24599.97}]}'
{"name":"shipping","keyspace":"betterbotz","columnDefinitions":[{"Name":"customer_name","TypeDefinition":"text"},{"Name":"id","TypeDefinition":"uuid"},{"Name":"prod_name","TypeDefinition":"text"},{"Name":"city","TypeDefinition":"text"},{"Name":"cust_id","TypeDefinition":"uuid"},{"Name":"country","TypeDefinition":"text"},{"Name":"prod_id","TypeDefinition":"uuid"},{"Name":"state","TypeDefinition":"text"},{"Name":"street","TypeDefinition":"text"},{"Name":"address_id","TypeDefinition":"uuid"},{"Name":"code","TypeDefinition":"text"}],"primaryKey":{"PartitionKey":["prod_name"],"clusteringKey":["customer_name"]},"tableOptions":{"DefaultTimeToLive":null,"clusteringExpression":[{"Column":"customer_name","Order":"asc"}]}}
ASTRAUSER=username ASTRAPASSWORD=password
Discover more
Better Botz
Share

One-stop Data API for Production GenAI

Astra DB gives JavaScript developers a complete data API and out-of-the-box integrations that make it easier to build production RAG apps with high relevancy and low latency.