Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException trying to load json array #107

Open
seanfisher1111 opened this issue Apr 24, 2020 · 0 comments
Open

NullPointerException trying to load json array #107

seanfisher1111 opened this issue Apr 24, 2020 · 0 comments

Comments

@seanfisher1111
Copy link

I have not been able to get a json array file to load successfully.
I keep getting null pointer errors.
Capture

My environment:

  • I'm using the latest pre-compiled version of cassandra loader (v0.0.27) on a Windows 10 machine, running java version 1.8.0_221.
  • I am using the bitnami cassandra in Docker.
    I am able to load regular delimited files to this container using cassandra loader, just not json files.

The data file is a UTF-8 encoded text file. I have tried it with both .json and .txt file extensions in case that mattered.

The contents are formatted as I would expect they should be.
[{"iID":1,"myfield":"row1value1"},{"iID":2,"myfield":"row2value1"}]

Here is the command I am using:
java -jar cassandra-loader -f c:\mytesttable.json -host localhost -port 32768 -format jsonarray -keyspace test -table mytable -user username -pw password

Here is the test table schema:
create table test.mytable (
iID int,
myfield text,

PRIMARY KEY (iID, myfield)
)
WITH CLUSTERING ORDER BY (myfield ASC);

mytesttable.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant