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

Reader parses schema but returns no rows #49

Closed
fzqneo opened this issue Nov 25, 2018 · 4 comments
Closed

Reader parses schema but returns no rows #49

fzqneo opened this issue Nov 25, 2018 · 4 comments

Comments

@fzqneo
Copy link

fzqneo commented Nov 25, 2018

The result of the first command suggests it connects to dynamodb and parses the schema. But there are no rows in the dataframe, while I'm sure the dynamodb table is not empty.

scala> val users = spark.sqlContext.read.dynamodb("ap-southeast-1", "user")
users: org.apache.spark.sql.DataFrame = [account_name: string, avatar: string ... 24 more fields]

scala> users.count()
res15: Long = 0
@protometa
Copy link

Damn, I'm just now running into this. Did you find any solution?

@protometa
Copy link

protometa commented Mar 19, 2019

This seemed to be related to having a nested json format. If I used json that wasn't nested or left out the nested fields in my schema the records showed up. I was able to work around by reading as rdd and then reading the rdd with dataframe json reader as suggested in #46

@PowerToThePeople111
Copy link

I got the same problem with this dynamodb exporter. This one works fine though and also seems to have been updated more recently.

@fzqneo
Copy link
Author

fzqneo commented Apr 1, 2019

I switched to something else and didn't continue with the issue. Please refer to the comments above for possible solution.

@fzqneo fzqneo closed this as completed Apr 1, 2019
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

3 participants