From user-return-39945-apmail-cassandra-user-archive=cassandra.apache.org@cassandra.apache.org Wed Apr 2 09:22:22 2014 Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7F9CF11AF9 for ; Wed, 2 Apr 2014 09:22:22 +0000 (UTC) Received: (qmail 47539 invoked by uid 500); 2 Apr 2014 09:22:20 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 46948 invoked by uid 500); 2 Apr 2014 09:22:17 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 46916 invoked by uid 99); 2 Apr 2014 09:22:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Apr 2014 09:22:12 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [194.138.248.75] (HELO krishna.sisl.co.in) (194.138.248.75) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Apr 2014 09:22:04 +0000 Received: from kaveri.sisl.co.in (kaveri.sisl.co.in [132.186.192.4]) by krishna.sisl.co.in (Postfix) with ESMTP id C124413E28E for ; Wed, 2 Apr 2014 15:44:19 +0530 (IST) Received: from INBLRK77N3MSX.in002.siemens.net (inblrk77n3msx.in002.siemens.net [132.186.221.164]) by kaveri.sisl.co.in (Postfix) with ESMTP id DFD1B3E63E8 for ; Wed, 2 Apr 2014 14:38:37 +0530 (IST) Received: from INBLRK77M1MSX.in002.siemens.net ([132.186.221.151]) by INBLRK77N3MSX.in002.siemens.net ([132.186.221.164]) with mapi; Wed, 2 Apr 2014 14:51:37 +0530 From: "Raveendran, Varsha IN BLR STS" To: "user@cassandra.apache.org" Date: Wed, 2 Apr 2014 14:51:36 +0530 Subject: Inserts with a dynamic datamodel using Datastax java driver Thread-Topic: Inserts with a dynamic datamodel using Datastax java driver Thread-Index: Ac9OVPIVbTsL0WkhSlWrUYE4+hhKfA== Message-ID: <106AD093A7677C44B14D5FDD573C26ECB951553E@INBLRK77M1MSX.in002.siemens.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: multipart/alternative; boundary="_000_106AD093A7677C44B14D5FDD573C26ECB951553EINBLRK77M1MSXin_" MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org --_000_106AD093A7677C44B14D5FDD573C26ECB951553EINBLRK77M1MSXin_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello, I am building a write client in java to insert records into Cassandra 2.0.= 5. I am using the Datastax java driver. Problem : The datamodel is dynamic. By dynamic, I mean that the number of = columns and the datatype of columns will be given as an input by the user. = It has only 1 keyspace and 1 column family. For inserting records bound statements seems the way to go. But the bind()= function accepts only a sequence of Objects ( column values) . How do I bind the values when the number and datatype of columns is given a= s input? Any suggestions? Thanks & Regards, Varsha --_000_106AD093A7677C44B14D5FDD573C26ECB951553EINBLRK77M1MSXin_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Hello,
 
I am building a write client in java to insert records into  Cass= andra 2.0.5.  I am using the Datastax java driver.
 
Problem : The datamodel is dynamic. By dynamic, I mean = that the number of columns and the datatype of columns will be given as an = input by the user.  It has only 1 keyspace and 1 column family.
 
For inserting records bound statements seems the way to go.  But = the bind() function accepts only a sequence of Objects  ( column value= s) .
How do I bind the values when the number and datatype of columns is gi= ven as input? Any suggestions?
 
Thanks & Regards,
Varsha
 
 
--_000_106AD093A7677C44B14D5FDD573C26ECB951553EINBLRK77M1MSXin_--