Giter Site home page Giter Site logo

Syntax error about cassandradump HOT 8 CLOSED

gianlucaborello avatar gianlucaborello commented on August 23, 2024
Syntax error

from cassandradump.

Comments (8)

zaibacu avatar zaibacu commented on August 23, 2024

Only on Python3.* version

from cassandradump.

jpatel956 avatar jpatel956 commented on August 23, 2024

@zaibacu , have you got solution for this syntex error? I have same problem.

from cassandradump.

zaibacu avatar zaibacu commented on August 23, 2024

quickfix would be:

lambda (k, v): v.data_type.typename == 'counter'

->

lambda x: x[1].data_type.typename == 'counter'

Maybe I will do PR if will not forget, issue seems to be a bit old

from cassandradump.

jpatel956 avatar jpatel956 commented on August 23, 2024

@zaibacu

It would be batter if you provide "cassandradump.py" file after updating as "k" and "v" variable used at some other place as well.

Thanks

from cassandradump.

jpatel956 avatar jpatel956 commented on August 23, 2024

@zaibacu

after replacing you code and executing following command.

python cassandradump.py --keyspace ABC --import-file sqldump.mysql

Got the following error:

<codecs.StreamReaderWriter object at 0x10f320278>
Traceback (most recent call last):
File "cassandradump.py", line 406, in
main()
File "cassandradump.py", line 398, in main
import_data(session)
File "cassandradump.py", line 152, in import_data
session.execute(statement)
File "cassandra/cluster.py", line 2171, in cassandra.cluster.Session.execute
File "cassandra/cluster.py", line 4062, in cassandra.cluster.ResponseFuture.result
cassandra.protocol.SyntaxException: <Error from server: code=2000 [Syntax error in CQL query] message="line 1:64 no viable alternative at input ';' (/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */[;])">

Can you please help me out?

Thanks

from cassandradump.

zaibacu avatar zaibacu commented on August 23, 2024

Well this error is kinda unrelated, and more like a problem with this project itself.

However, at first glance - it looks that you're trying to import MySQL file to Cassandra? Cassandra uses CQL. CQL is mostly similar, but there are some syntax differences which makes it incompatible

from cassandradump.

jpatel956 avatar jpatel956 commented on August 23, 2024

@zaibacu

Thanks for your time. as this repository mention, You can import/export data from cassandra so i am tring exact things. however have you ever tried to dump all mysql database to cassandra ?

Thanks

from cassandradump.

gianlucaborello avatar gianlucaborello commented on August 23, 2024

I'm closing this one since I just merged the relative PR. @jpatel956 the goal of this project is not to make it compatible with MySQL, it's just to have a quick and easy way to dump Cassandra data as if it was the mysqldump tool, but MySQL doesn't really enter into the picture here.

Thanks

from cassandradump.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.