{"id":52002,"date":"1970-01-01T00:00:00","date_gmt":"1970-01-01T08:00:00","guid":{"rendered":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/blog\/tutorial-ingesting-data-with-kafka-and-griddbs-jdbc-interface\/"},"modified":"1970-01-01T00:00:00","modified_gmt":"1970-01-01T08:00:00","slug":"tutorial-ingesting-data-with-kafka-and-griddbs-jdbc-interface","status":"publish","type":"post","link":"https:\/\/griddb.net\/en\/blog\/tutorial-ingesting-data-with-kafka-and-griddbs-jdbc-interface\/","title":{"rendered":"Tutorial: Ingesting Data with Kafka and GridDB&#8217;s JDBC Interface"},"content":{"rendered":"<p>In this tutorial we feed the CASAS Dataset through Kafka and into GridDB with a Kafka Connect Sink that uses GridDB&#8217;s new JDBC interface. <\/p>\n<p>The raw TSV data will be converted into JSON with Gawk and then fed into Kafka with a Console Producer. Then the GridDB JDBC Sink will read the data and write it to GridDB. Finally, we&#8217;ll inspect the data with SQLWorkbench\/J.<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-07-at-10.35.20-AM.png\" alt=\"\" width=\"696\" height=\"356\" class=\"alignnone size-full wp-image-26771\" srcset=\"\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-07-at-10.35.20-AM.png 696w, \/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-07-at-10.35.20-AM-300x153.png 300w, \/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-07-at-10.35.20-AM-600x307.png 600w\" sizes=\"(max-width: 696px) 100vw, 696px\" \/><\/p>\n<h1>Setup Kafka<\/h1>\n<p><a href=\"https:\/\/kafka.apache.org\/\">Kafka<\/a> is a data streaming platform with many different possible inputs and outputs that are easy to create. For this tutorial we&#8217;ll use a Kafka Console Producer to put data into Kafka which will be then consumed by Kafka Connect Sink that we are going write. <\/p>\n<p>We are going to follow the <a href=https:\/\/kafka.apache.org\/quickstart>Kafka Qucikstart<\/a>. Kafka can be downloaded from their <A href=https:\/\/kafka.apache.org\/downloads>downloads page<\/a>, we&#8217;re using version 2.12-2.5.0. You will also need to have a Java 1.8 development environment installed on your system. After downloading, we simply untar and start the Zookeeper and Kafka Servers.<\/p>\n<pre>\n$ tar xzvf kafka_2.12-2.5.0.tgz\n$ cd kafka_2.12-2.5.0\n$ bin\/zookeeper-server-start.sh config\/zookeeper.properties\n$ bin\/kafka-server-start.sh config\/server.properties\n<\/pre>\n<p>As Zookeeper and Kafka are not daemons by default, have multiple terminals handy that wont terminate (or use screen) if you have network issues. <\/p>\n<h1>Data Set<\/h1>\n<p><a href=\"http:\/\/casas.wsu.edu\/\">CASAS<\/a> is research group based out of the Washington State University that has a <a href=\"https:\/\/archive.ics.uci.edu\/ml\/datasets\/Human+Activity+Recognition+from+Continuous+Ambient+Sensor+Data\">large sensor dataset<\/a>. The data was collected from a variety of in-home sensors while volunteers performed their normal daily routines. We are going to use this dataset in a series of tutorials to demonstrate how to use GridDB to ingest, analyze, and visualize data. <\/p>\n<p>The data looks like this:<\/p>\n<pre>\n2012-07-18 12:54:45.126257\tD001\tIgnore\t\tIgnore\t\tCLOSE\tControl4-Door\n2012-07-18 12:54:45.196564\tD002\tOutsideDoor\tFrontDoor\tOPEN\tControl4-Door\n2012-07-18 12:54:45.247825\tT102\tIgnore\t\tFrontDoorTemp\t78\tControl4-Temperature\n2012-07-18 12:54:45.302398\tBATP102\tIgnore\t\tIgnore\t\t85\tControl4-BatteryPercent\n2012-07-18 12:54:45.399416\tT103\tIgnore\t\tBathroomTemp\t25\tControl4-Temperature\n2012-07-18 12:54:45.472391\tBATP103\tIgnore\t\tIgnore\t\t82\tControl4-BatteryPercent\n2012-07-18 12:54:45.606580\tT101\tIgnore\t\tIgnore\t\t31\tControl4-Temperature\n2012-07-18 12:54:45.682577\tMA016\tKitchen\t\tKitchen\t\tOFF\tControl4-MotionArea\n2012-07-18 12:54:45.723461\tD003\tBathroom\tBathroomDoor\tOPEN\tControl4-Door\n2012-07-18 12:54:45.767498\tM009\tBedroom\t\tBedroom\t\tON\tControl4-Motion\n<\/pre>\n<p>The fields of the TSV file are:<\/p>\n<li>Date\n<li>Time\n<li>Sensor ID\n<li>The Room the sensor is in.\n<li>What the sensor is sensing\n<li>Sesnor Message\n<li>Sensor Activity\n<p>To put the CASAS data into Kafka, we&#8217;ll use a <a href=\"https:\/\/www.gnu.org\/software\/gawk\">Gawk<\/a> (a great text processing tool) to convert the TSV data to JSON that will be then fed into the Kafka Console Producer. If the sensor data was live, it would likely be fed into Kafka via MQTT or an HTTP endpoint. <\/p>\n<p>Here is the simple shell script (casas_convert.sh) takes the CASAS location ID as an argument and uses Gawk to convert the CSV to JSON which is output on stdout looks like this: <\/p>\n<pre>\n#!\/bin\/bash\n\ncat  ${1}\/${1}.rawdata.txt | gawk  '{ printf \"{\"datetime\" : \"%s %s\",  \"sensor\" : \"%s\", \"translate01\": \"%s\",  \"translate02\": \"%s\", \"message\":\"%s\", \"sensoractivity\": \"%s\", \"location\": \"'$1'\"   }n\", $1, $2, $3, $4, $5, $6, $7 }'\n\n<\/pre>\n<p>Then we can ingest it with Kafka Console Producer: <\/p>\n<pre>\nfor loc in `ls`; do\n   .\/casas_covert.sh $loc | \/path\/to\/kafka\/bin\/kafka-console-producer.sh  --bootstrap-server localhost:9092 --topic casas\ndone\n<\/pre>\n<h1>Coding the GridDB Sink<\/h1>\n<p>Two files make up the GridDB JDBC Sink, the first is GridDBSinkConnector.java which primarily handles reading the configuration file and creating the properties that will be used by the second file, GridDBSinkTask.java.<\/p>\n<p>GridDBSinkConnector.java:<\/p>\n<pre>\n    public static final String JDBCURL_CONFIG = \"jdbcurl\";\n    public static final String USER_CONFIG = \"user\";\n    public static final String PASSWORD_CONFIG = \"password\";\n    private static final ConfigDef CONFIG_DEF = new ConfigDef()\n    .define(JDBCURL_CONFIG, Type.STRING, Importance.HIGH, \"GridDB JDBC URL\")\n    .define(USER_CONFIG, Type.STRING, Importance.HIGH, \"GridDB Username\")\n    .define(PASSWORD_CONFIG, Type.STRING, Importance.HIGH, \"GridDB Password\");\n\n    String jdbcurl, user, password;\n\n    @Override\n    public void start(Map<String, String> props) {\n        jdbcurl = props.get(JDBCURL_CONFIG);\n        user = props.get(USER_CONFIG);\n        password = props.get(PASSWORD_CONFIG);\n        System.out.println(\"Connector starting\");\n    }\n\n    @Override\n    public List<Map<String, String>> taskConfigs(int maxTasks) {\n        ArrayList<Map<String, String>> configs = new ArrayList<>();\n        for (int i = 0; i < maxTasks; i++) {\n            Map<String, String> config = new HashMap<>();\n            if (jdbcurl != null)\n                config.put(JDBCURL_CONFIG, jdbcurl);\n            if (user != null)\n                config.put(USER_CONFIG, user);\n            if (password != null)\n                config.put(PASSWORD_CONFIG, password);\n            configs.add(config);\n        }\n\n        return configs;\n    }\n<\/pre>\n<p>GridDBSinkTask.java is more interesting, first the start() method connects to JDBC from the configuration properties that was created by GridDBSinkConnector<\/p>\n<pre>\n    @Override public void start(Map<String, String> props) {\n        System.out.println(\"Starting Task....\");\n        Properties gsprops = new Properties();\n        gsprops.setProperty(\"applicationName\", \"GRIDDB_KAFKA\");\n        gsprops.setProperty(\"user\", props.get(GridDBSinkConnector.USER_CONFIG));\n        gsprops.setProperty(\"password\", props.get(GridDBSinkConnector.PASSWORD_CONFIG));\n\n        fmt = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss.SSS\");\n\n        try {\n            con = DriverManager.getConnection(props.get(GridDBSinkConnector.JDBCURL_CONFIG) , gsprops);\n        } catch (Exception ex) {\n            System.out.println(\"Failed to connec to jdbcn\" + ex);\n        }\n    }\n<\/pre>\n<p>The put() method actually writes all data in the subscribed Kafka topic to GridDB using a JDBC prepared statement. One important thing to note is that your prepared statement must be closed in the exception handler, otherwise future prepared statements wont execute. <\/p>\n<pre>\n    @Override public void put(Collection<SinkRecord> sinkRecords) { \n        boolean first = true;\n        System.out.println(\"Processing \"+ sinkRecords.size() + \" records...\");\n\n        try { \n            Statement stmt = con.createStatement();\n            PreparedStatement  pstmt = null;\n            for (SinkRecord record : sinkRecords) {\n                try {\n                    HashMap map = (HashMap)record.value();\n                    stmt.executeUpdate(\"CREATE TABLE IF NOT EXISTS \" + map.get(\"location\")+\"_\"+map.get(\"sensor\") + \" ( dt timestamp primary key, sensor text, translate01 text, translate02 text, message text, sensoractivity text)\");\n                    pstmt = con.prepareStatement(\"INSERT OR UPDATE INTO \"+map.get(\"location\")+\"_\"+map.get(\"sensor\")+\" VALUES (?, ?, ?, ?, ?, ?)\");\n                    pstmt.setTimestamp(1, new Timestamp(fmt.parse((String)map.get(\"datetime\")).getTime()));\n                    pstmt.setString(2, (String)map.get(\"sensor\"));\n                    pstmt.setString(3, (String)map.get(\"translate01\"));\n                    pstmt.setString(4, (String)map.get(\"translate02\"));\n                    pstmt.setString(5, (String)map.get(\"message\"));\n                    pstmt.setString(6, (String)map.get(\"sensoraction\"));\n                    pstmt.execute();\n\n                    if(first) {\n                        System.out.println(\"Wrote \"+map);\n                        first=false;\n                    }\n                } catch (Exception e) {\n                    pstmt.close();\n                    System.out.println(\"Failed to write \"+map);\n                }\n            }\n        } catch (Exception e) {\n            e.printStackTrace();\n        }\n    }\n<\/pre>\n<p>We use Gradle to build the Jar:<\/p>\n<pre>\n$ .\/gradlew jar \n:compileJava \n:processResources \n:classes \n:jar\n\nBUILD SUCCESSFUL\n<\/pre>\n<h1>Running the GridDB Sink<\/h1>\n<p>We will assume that you already have GridDB 4.5 CE installed and running the GridDB JDBC Jar built. We will copy GridDB JDBC jar and the GridDB Sink Jar to the Kafka Libs folder. <\/p>\n<pre>\n$ cp \/path\/to\/griddb-jdbc-sink\/build\/libs\/griddb-jdbc-sink.jar \/path\/to\/kafka\/libs\n$ cp \/path\/to\/griddb-jdbc\/bin\/griddb-jdbc.jar \/path\/to\/kafka\/libs\n<\/pre>\n<p>A configuration file is required for the Sink which defines the Sink Class, the topics it subscribes too as well as any configuration properties that the Sink itself requires. <\/p>\n<pre>\nname=griddb-sink\nconnector.class=net.griddb.connect.griddb.GridDBSinkConnector\ntasks.max=1\ntopics=casas\nschemas.enable=true\njdbcurl=jdbc:gs:\/\/239.0.0.1:41999\/defaultCluster\/public\nuser=admin\npassword=admin\ndatabase=public\n<\/pre>\n<p>You will also need to edit configs\/connect-standalone.properties, changing key.converter.schemas.enable and<br \/>\nvalue.converter.schemas.enable to false.<\/p>\n<p>Now we can start the Sink and data will start being ingested if the above console-producer has been run.  <\/p>\n<pre>\n$ cd path\/to\/kafka\n$ .\/bin\/connect-standalone.sh config\/connect-standalone.properties config\/griddb-sink.properties\n[2020-08-07 17:02:38,802] INFO Kafka Connect standalone worker initializing ... (org.apache.kafka.connect.cli.ConnectStandalone:69)\n[2020-08-07 17:53:02,117] INFO Kafka version: 2.5.0 (org.apache.kafka.common.utils.AppInfoParser:117)\n[2020-08-07 17:53:02,117] INFO Kafka commitId: 66563e712b0b9f84 (org.apache.kafka.common.utils.AppInfoParser:118)\n[2020-08-07 17:53:02,117] INFO Kafka startTimeMs: 1596819182117 (org.apache.kafka.common.utils.AppInfoParser:119)\n[2020-08-07 17:53:02,124] INFO Created connector griddb-sink (org.apache.kafka.connect.cli.ConnectStandalone:112)\n[2020-08-07 17:53:02,125] INFO [Consumer clientId=connector-consumer-griddb-sink-0, groupId=connect-griddb-sink] Subscribed to topic(s): casas (org.apache.kafka.clients.consumer.KafkaConsumer:974)\nStarting Task....\n[2020-08-07 17:53:05,901] INFO [Consumer clientId=connector-consumer-griddb-sink-0, groupId=connect-griddb-sink] Adding newly assigned partitions: casas-0 (org.apache.kafka.clients.consumer.internals.ConsumerCoordinator:273)\n[2020-08-07 17:53:05,914] INFO [Consumer clientId=connector-consumer-griddb-sink-0, groupId=connect-griddb-sink] Setting offset for partition casas-0 to the committed offset FetchPosition{offset=108465, offsetEpoch=Optional.empty, currentLeader=LeaderAndEpoch{leader=Optional[localhost:9092 (id: 0 rack: null)], epoch=0}} (org.apache.kafka.clients.consumer.internals.ConsumerCoordinator:792)\nProcessing 500 records...\nWrote {datetime=2011-06-29 21:02:50.709770, translate01=Bathroom, sensoractivity=Control4-MotionArea, translate02=Bathroom, sensor=MA013, location=csh102, message=OFF}\nProcessing 500 records...\nWrote {datetime=2011-06-30 06:29:24.054707, translate01=Ignore, sensoractivity=Control4-LightSensor, translate02=Ignore, sensor=LS006, location=csh102, message=9}\nProcessing 500 records...\nWrote {datetime=2011-06-30 08:29:32.667029, translate01=Kitchen, sensoractivity=Control4-Motion, translate02=Kitchen, sensor=M008, location=csh102, message=ON}\nProcessing 500 records...\nWrote {datetime=2011-06-30 08:55:23.796199, translate01=Bathroom, sensoractivity=Control4-MotionArea, translate02=Bathroom, sensor=MA013, location=csh102, message=OFF}\nProcessing 500 records...\n... \n<\/pre>\n<h1>Inspecting the Data<\/h1>\n<p>In a previous <a href=\"https:\/\/griddb.net\/en\/blog\/connecting-to-griddb-via-jdbc-with-sqlworkbench-j\/\">blog post<\/a>, we showed how to use SQLWorkbench\/J to see data in GridDB so we&#8217;re going to use it here to have a look at the data.<\/p>\n<p>After a successful connection to the database, select the <code>Tools->Show Database Explorer<\/code> menu item or press <code>Ctrl-d<\/code> and a list of tables in GridDB will be shown. Selecting a table will allow you to see it&#8217;s data by selecting the Data tab on the right as shown here.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2020\/08\/casas_sqlworkbenchj.png\" alt=\"\" width=\"959\" height=\"640\" class=\"alignnone size-full wp-image-26769\" srcset=\"\/wp-content\/uploads\/2020\/08\/casas_sqlworkbenchj.png 959w, \/wp-content\/uploads\/2020\/08\/casas_sqlworkbenchj-300x200.png 300w, \/wp-content\/uploads\/2020\/08\/casas_sqlworkbenchj-768x513.png 768w, \/wp-content\/uploads\/2020\/08\/casas_sqlworkbenchj-600x400.png 600w\" sizes=\"(max-width: 959px) 100vw, 959px\" \/><\/p>\n<p>You can download the source for the GridDB JDBC Sink and Gawk Script <a href=\"\">TODO-here<\/a>. Also, please be sure to check back to see how we analyze and visualize the CASAS dataset using GridDB&#8217;s JDBC interface in future tutorials.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial we feed the CASAS Dataset through Kafka and into GridDB with a Kafka Connect Sink that uses GridDB&#8217;s new JDBC interface. The raw TSV data will be converted into JSON with Gawk and then fed into Kafka with a Console Producer. Then the GridDB JDBC Sink will read the data and write [&hellip;]<\/p>\n","protected":false},"author":71,"featured_media":52003,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[121],"tags":[],"class_list":["post-52002","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Tutorial: Ingesting Data with Kafka and GridDB&#039;s JDBC Interface | GridDB: Open Source Time Series Database for IoT<\/title>\n<meta name=\"description\" content=\"In this tutorial we feed the CASAS Dataset through Kafka and into GridDB with a Kafka Connect Sink that uses GridDB&#039;s new JDBC interface. The raw TSV data\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/griddb.net\/en\/blog\/tutorial-ingesting-data-with-kafka-and-griddbs-jdbc-interface\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Tutorial: Ingesting Data with Kafka and GridDB&#039;s JDBC Interface | GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"og:description\" content=\"In this tutorial we feed the CASAS Dataset through Kafka and into GridDB with a Kafka Connect Sink that uses GridDB&#039;s new JDBC interface. The raw TSV data\" \/>\n<meta property=\"og:url\" content=\"https:\/\/griddb.net\/en\/blog\/tutorial-ingesting-data-with-kafka-and-griddbs-jdbc-interface\/\" \/>\n<meta property=\"og:site_name\" content=\"GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/griddbcommunity\/\" \/>\n<meta property=\"article:published_time\" content=\"1970-01-01T08:00:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/griddb.net\/wp-content\/uploads\/2025\/12\/casas_sqlworkbenchj.png\" \/>\n\t<meta property=\"og:image:width\" content=\"959\" \/>\n\t<meta property=\"og:image:height\" content=\"640\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Owen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@GridDBCommunity\" \/>\n<meta name=\"twitter:site\" content=\"@GridDBCommunity\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Owen\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/griddb.net\/en\/blog\/tutorial-ingesting-data-with-kafka-and-griddbs-jdbc-interface\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/tutorial-ingesting-data-with-kafka-and-griddbs-jdbc-interface\/\"},\"author\":{\"name\":\"Owen\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/0f2f6d4b593adde8c43cf3ea5c794c66\"},\"headline\":\"Tutorial: Ingesting Data with Kafka and GridDB&#8217;s JDBC Interface\",\"datePublished\":\"1970-01-01T08:00:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/tutorial-ingesting-data-with-kafka-and-griddbs-jdbc-interface\/\"},\"wordCount\":720,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/tutorial-ingesting-data-with-kafka-and-griddbs-jdbc-interface\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2025\/12\/casas_sqlworkbenchj.png\",\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/griddb.net\/en\/blog\/tutorial-ingesting-data-with-kafka-and-griddbs-jdbc-interface\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/griddb.net\/en\/blog\/tutorial-ingesting-data-with-kafka-and-griddbs-jdbc-interface\/\",\"url\":\"https:\/\/griddb.net\/en\/blog\/tutorial-ingesting-data-with-kafka-and-griddbs-jdbc-interface\/\",\"name\":\"Tutorial: Ingesting Data with Kafka and GridDB's JDBC Interface | GridDB: Open Source Time Series Database for IoT\",\"isPartOf\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/tutorial-ingesting-data-with-kafka-and-griddbs-jdbc-interface\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/tutorial-ingesting-data-with-kafka-and-griddbs-jdbc-interface\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2025\/12\/casas_sqlworkbenchj.png\",\"datePublished\":\"1970-01-01T08:00:00+00:00\",\"description\":\"In this tutorial we feed the CASAS Dataset through Kafka and into GridDB with a Kafka Connect Sink that uses GridDB's new JDBC interface. The raw TSV data\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/griddb.net\/en\/blog\/tutorial-ingesting-data-with-kafka-and-griddbs-jdbc-interface\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/griddb.net\/en\/blog\/tutorial-ingesting-data-with-kafka-and-griddbs-jdbc-interface\/#primaryimage\",\"url\":\"\/wp-content\/uploads\/2025\/12\/casas_sqlworkbenchj.png\",\"contentUrl\":\"\/wp-content\/uploads\/2025\/12\/casas_sqlworkbenchj.png\",\"width\":959,\"height\":640},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#website\",\"url\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/\",\"name\":\"GridDB: Open Source Time Series Database for IoT\",\"description\":\"GridDB is an open source time-series database with the performance of NoSQL and convenience of SQL\",\"publisher\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization\",\"name\":\"Fixstars\",\"url\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png\",\"contentUrl\":\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png\",\"width\":200,\"height\":83,\"caption\":\"Fixstars\"},\"image\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/griddbcommunity\/\",\"https:\/\/x.com\/GridDBCommunity\",\"https:\/\/www.linkedin.com\/company\/griddb-by-toshiba\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/0f2f6d4b593adde8c43cf3ea5c794c66\",\"name\":\"Owen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/47438a5c81215c7a9043be1b427e0bbd8dc0f77bd536f147f8495575149e4325?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/47438a5c81215c7a9043be1b427e0bbd8dc0f77bd536f147f8495575149e4325?s=96&d=mm&r=g\",\"caption\":\"Owen\"},\"url\":\"https:\/\/griddb.net\/en\/author\/owen\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Tutorial: Ingesting Data with Kafka and GridDB's JDBC Interface | GridDB: Open Source Time Series Database for IoT","description":"In this tutorial we feed the CASAS Dataset through Kafka and into GridDB with a Kafka Connect Sink that uses GridDB's new JDBC interface. The raw TSV data","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/griddb.net\/en\/blog\/tutorial-ingesting-data-with-kafka-and-griddbs-jdbc-interface\/","og_locale":"en_US","og_type":"article","og_title":"Tutorial: Ingesting Data with Kafka and GridDB's JDBC Interface | GridDB: Open Source Time Series Database for IoT","og_description":"In this tutorial we feed the CASAS Dataset through Kafka and into GridDB with a Kafka Connect Sink that uses GridDB's new JDBC interface. The raw TSV data","og_url":"https:\/\/griddb.net\/en\/blog\/tutorial-ingesting-data-with-kafka-and-griddbs-jdbc-interface\/","og_site_name":"GridDB: Open Source Time Series Database for IoT","article_publisher":"https:\/\/www.facebook.com\/griddbcommunity\/","article_published_time":"1970-01-01T08:00:00+00:00","og_image":[{"width":959,"height":640,"url":"https:\/\/griddb.net\/wp-content\/uploads\/2025\/12\/casas_sqlworkbenchj.png","type":"image\/png"}],"author":"Owen","twitter_card":"summary_large_image","twitter_creator":"@GridDBCommunity","twitter_site":"@GridDBCommunity","twitter_misc":{"Written by":"Owen","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/griddb.net\/en\/blog\/tutorial-ingesting-data-with-kafka-and-griddbs-jdbc-interface\/#article","isPartOf":{"@id":"https:\/\/griddb.net\/en\/blog\/tutorial-ingesting-data-with-kafka-and-griddbs-jdbc-interface\/"},"author":{"name":"Owen","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/0f2f6d4b593adde8c43cf3ea5c794c66"},"headline":"Tutorial: Ingesting Data with Kafka and GridDB&#8217;s JDBC Interface","datePublished":"1970-01-01T08:00:00+00:00","mainEntityOfPage":{"@id":"https:\/\/griddb.net\/en\/blog\/tutorial-ingesting-data-with-kafka-and-griddbs-jdbc-interface\/"},"wordCount":720,"commentCount":0,"publisher":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization"},"image":{"@id":"https:\/\/griddb.net\/en\/blog\/tutorial-ingesting-data-with-kafka-and-griddbs-jdbc-interface\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2025\/12\/casas_sqlworkbenchj.png","articleSection":["Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/griddb.net\/en\/blog\/tutorial-ingesting-data-with-kafka-and-griddbs-jdbc-interface\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/griddb.net\/en\/blog\/tutorial-ingesting-data-with-kafka-and-griddbs-jdbc-interface\/","url":"https:\/\/griddb.net\/en\/blog\/tutorial-ingesting-data-with-kafka-and-griddbs-jdbc-interface\/","name":"Tutorial: Ingesting Data with Kafka and GridDB's JDBC Interface | GridDB: Open Source Time Series Database for IoT","isPartOf":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/griddb.net\/en\/blog\/tutorial-ingesting-data-with-kafka-and-griddbs-jdbc-interface\/#primaryimage"},"image":{"@id":"https:\/\/griddb.net\/en\/blog\/tutorial-ingesting-data-with-kafka-and-griddbs-jdbc-interface\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2025\/12\/casas_sqlworkbenchj.png","datePublished":"1970-01-01T08:00:00+00:00","description":"In this tutorial we feed the CASAS Dataset through Kafka and into GridDB with a Kafka Connect Sink that uses GridDB's new JDBC interface. The raw TSV data","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/griddb.net\/en\/blog\/tutorial-ingesting-data-with-kafka-and-griddbs-jdbc-interface\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/griddb.net\/en\/blog\/tutorial-ingesting-data-with-kafka-and-griddbs-jdbc-interface\/#primaryimage","url":"\/wp-content\/uploads\/2025\/12\/casas_sqlworkbenchj.png","contentUrl":"\/wp-content\/uploads\/2025\/12\/casas_sqlworkbenchj.png","width":959,"height":640},{"@type":"WebSite","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#website","url":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/","name":"GridDB: Open Source Time Series Database for IoT","description":"GridDB is an open source time-series database with the performance of NoSQL and convenience of SQL","publisher":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization","name":"Fixstars","url":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/logo\/image\/","url":"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png","contentUrl":"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png","width":200,"height":83,"caption":"Fixstars"},"image":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/griddbcommunity\/","https:\/\/x.com\/GridDBCommunity","https:\/\/www.linkedin.com\/company\/griddb-by-toshiba"]},{"@type":"Person","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/0f2f6d4b593adde8c43cf3ea5c794c66","name":"Owen","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/47438a5c81215c7a9043be1b427e0bbd8dc0f77bd536f147f8495575149e4325?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/47438a5c81215c7a9043be1b427e0bbd8dc0f77bd536f147f8495575149e4325?s=96&d=mm&r=g","caption":"Owen"},"url":"https:\/\/griddb.net\/en\/author\/owen\/"}]}},"_links":{"self":[{"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/posts\/52002","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/users\/71"}],"replies":[{"embeddable":true,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/comments?post=52002"}],"version-history":[{"count":0,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/posts\/52002\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/media\/52003"}],"wp:attachment":[{"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/media?parent=52002"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/categories?post=52002"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/tags?post=52002"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}