Table of Contents |
---|
...
chango provides Chango Client API Library written in java.
Create Iceberg Table before sending json to chango
As seen in ingestion of json to chango using Chango CLI https://mykidong.atlassian.net/wiki/spaces/CHANGOCLOUD/pages/2212724750/Chango+CLI#Create-Iceberg-Table-before-Json-Data-Ingestion , you need to create iceberg table beforehand.
Download Chango Client API Library
Download chango client library. It needs to be added to your application classpath.
Code Block |
---|
curl -L -O https://github.com/cloudcheflabs/spark/releases/download/chango-client-1.0.0-SNAPSHOT/chango-client-1.0.0-SNAPSHOT-executable.jar; |
Example of sending json to chango using Chango Client Library
You may construct chango client instance like this.
...
Code Block |
---|
String json = ...
// add json coming from your application to the internal queue in chango client.
changoClient.add(json); |
Query Iceberg Table using Trino Clients
Json data ingested to iceberg table in chango can be queries using trino clients like Trino CLI, Redash and Metabase.
You can run the following query if json data is ingested to chango.
Code Block |
---|
select * from iceberg.iceberg_db.test_iceberg limit 1000; |