You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Harikrishnan A <ha...@yahoo.com.INVALID> on 2017/08/14 05:49:47 UTC

cqlsh -e output - How to change the default delimiter '|' in the output

Hello,
When I execute cqlsh -e "SELECT statement .."  , it gives the output with a pipe ('|') separator. Is there anyway I can change this default delimiter in the output of cqlsh -e " SELECT statement ..". 
Thanks & Regards,Hari

Re: cqlsh -e output - How to change the default delimiter '|' in the output

Posted by Jon Haddad <jo...@gmail.com>.
Using COPY .. TO you can export using the DELIMITER option, does that help?


> On Aug 15, 2017, at 9:01 PM, Harikrishnan A <ha...@yahoo.com.INVALID> wrote:
> 
> Thank you all
> 
> Regards,
> Hari
> 
> 
> On Tuesday, August 15, 2017 12:55 AM, Erick Ramirez <fl...@gmail.com> wrote:
> 
> 
> +1 to Jim and Tobin. cqlsh wasn't designed for what you're trying to achieve. Cheers!
> 
> On Tue, Aug 15, 2017 at 1:34 AM, Tobin Landricombe <tobin@sensatus.com <ma...@sensatus.com>> wrote:
> Can't change the delimiter (I'm on cqlsh 5.0.1). Best I can offer is https://docs.datastax.com/en/ cql/3.3/cql/cql_reference/ cqlshExpand.html <https://docs.datastax.com/en/cql/3.3/cql/cql_reference/cqlshExpand.html>
> 
> > On 14 Aug 2017, at 16:17, Jim Witschey <jim.witschey@datastax.com <ma...@datastax.com>> wrote:
> >
> > Not knowing the problem you're trying to solve, I'm going to guess
> > cqlsh is a bad tool for this job. If you want to put the results of
> > CQL queries into a shell pipeline, a small custom script using a
> > driver is probably a better fit, and should be possible to write
> > without much effort.
> >
> > ------------------------------ ------------------------------ ---------
> > To unsubscribe, e-mail: user-unsubscribe@cassandra. apache.org <ma...@cassandra.apache.org>
> > For additional commands, e-mail: user-help@cassandra.apache.org <ma...@cassandra.apache.org>
> >
> 
> 
> ------------------------------ ------------------------------ ---------
> To unsubscribe, e-mail: user-unsubscribe@cassandra. apache.org <ma...@cassandra.apache.org>
> For additional commands, e-mail: user-help@cassandra.apache.org <ma...@cassandra.apache.org>
> 
> 
> 
> 


Re: cqlsh -e output - How to change the default delimiter '|' in the output

Posted by Harikrishnan A <ha...@yahoo.com.INVALID>.
Thank you all
Regards,Hari 

    On Tuesday, August 15, 2017 12:55 AM, Erick Ramirez <fl...@gmail.com> wrote:
 

 +1 to Jim and Tobin. cqlsh wasn't designed for what you're trying to achieve. Cheers!
On Tue, Aug 15, 2017 at 1:34 AM, Tobin Landricombe <to...@sensatus.com> wrote:

Can't change the delimiter (I'm on cqlsh 5.0.1). Best I can offer is https://docs.datastax.com/en/ cql/3.3/cql/cql_reference/ cqlshExpand.html

> On 14 Aug 2017, at 16:17, Jim Witschey <ji...@datastax.com> wrote:
>
> Not knowing the problem you're trying to solve, I'm going to guess
> cqlsh is a bad tool for this job. If you want to put the results of
> CQL queries into a shell pipeline, a small custom script using a
> driver is probably a better fit, and should be possible to write
> without much effort.
>
> ------------------------------ ------------------------------ ---------
> To unsubscribe, e-mail: user-unsubscribe@cassandra. apache.org
> For additional commands, e-mail: user-help@cassandra.apache.org
>


------------------------------ ------------------------------ ---------
To unsubscribe, e-mail: user-unsubscribe@cassandra. apache.org
For additional commands, e-mail: user-help@cassandra.apache.org





   

Re: cqlsh -e output - How to change the default delimiter '|' in the output

Posted by Erick Ramirez <fl...@gmail.com>.
+1 to Jim and Tobin. cqlsh wasn't designed for what you're trying to
achieve. Cheers!

On Tue, Aug 15, 2017 at 1:34 AM, Tobin Landricombe <to...@sensatus.com>
wrote:

> Can't change the delimiter (I'm on cqlsh 5.0.1). Best I can offer is
> https://docs.datastax.com/en/cql/3.3/cql/cql_reference/cqlshExpand.html
>
> > On 14 Aug 2017, at 16:17, Jim Witschey <ji...@datastax.com>
> wrote:
> >
> > Not knowing the problem you're trying to solve, I'm going to guess
> > cqlsh is a bad tool for this job. If you want to put the results of
> > CQL queries into a shell pipeline, a small custom script using a
> > driver is probably a better fit, and should be possible to write
> > without much effort.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@cassandra.apache.org
> > For additional commands, e-mail: user-help@cassandra.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@cassandra.apache.org
> For additional commands, e-mail: user-help@cassandra.apache.org
>
>

Re: cqlsh -e output - How to change the default delimiter '|' in the output

Posted by Tobin Landricombe <to...@sensatus.com>.
Can't change the delimiter (I'm on cqlsh 5.0.1). Best I can offer is https://docs.datastax.com/en/cql/3.3/cql/cql_reference/cqlshExpand.html

> On 14 Aug 2017, at 16:17, Jim Witschey <ji...@datastax.com> wrote:
> 
> Not knowing the problem you're trying to solve, I'm going to guess
> cqlsh is a bad tool for this job. If you want to put the results of
> CQL queries into a shell pipeline, a small custom script using a
> driver is probably a better fit, and should be possible to write
> without much effort.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@cassandra.apache.org
> For additional commands, e-mail: user-help@cassandra.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@cassandra.apache.org
For additional commands, e-mail: user-help@cassandra.apache.org


Re: cqlsh -e output - How to change the default delimiter '|' in the output

Posted by Jim Witschey <ji...@datastax.com>.
Not knowing the problem you're trying to solve, I'm going to guess
cqlsh is a bad tool for this job. If you want to put the results of
CQL queries into a shell pipeline, a small custom script using a
driver is probably a better fit, and should be possible to write
without much effort.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@cassandra.apache.org
For additional commands, e-mail: user-help@cassandra.apache.org


Re: cqlsh -e output - How to change the default delimiter '|' in the output

Posted by Harikrishnan A <ha...@yahoo.com.INVALID>.
I have column values with Pipe separator, hence unable to replace this default delimiter from the output.
Thanks Hari 

    On Monday, August 14, 2017 12:12 AM, algermissen1971 <al...@icloud.com> wrote:
 

 

On 14.08.2017, at 07:49, Harikrishnan A <ha...@yahoo.com.INVALID> wrote:


Hello,
When I execute cqlsh -e "SELECT statement .."  , it gives the output with a pipe ('|') separator. Is there anyway I can change this default delimiter in the output of cqlsh -e " SELECT statement ..". 

What about sed?
Jan


Thanks & Regards,Hari


   

Re: cqlsh -e output - How to change the default delimiter '|' in the output

Posted by algermissen1971 <al...@icloud.com>.

> On 14.08.2017, at 07:49, Harikrishnan A <ha...@yahoo.com.INVALID> wrote:
> 
> Hello,
> 
> When I execute cqlsh -e "SELECT statement .."  , it gives the output with a pipe ('|') separator. Is there anyway I can change this default delimiter in the output of cqlsh -e " SELECT statement ..". 

What about sed?

Jan

> 
> Thanks & Regards,
> Hari