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

Getting Null Values when using SparkSql #35

Open
bhavikpatel91 opened this issue Aug 22, 2017 · 1 comment
Open

Getting Null Values when using SparkSql #35

bhavikpatel91 opened this issue Aug 22, 2017 · 1 comment

Comments

@bhavikpatel91
Copy link

Hi,

I am loading DynamoDb table and Registering it for querying using SparkSql.

e.g

//Step 1
val TableDf = spark.read.dynamodb("some table")

//Step 2
val TableDf = spark.read.dynamodb("some table").cache()

TableDf.createOrReplaceTempView("someTable")

val dataDF = spark.sql("select * from someTable")
// This shows all the values as saved in Dynamo Table
dataDF.show()

val newDF = spark.sql("select a,b,c from someTable")
// When using Step 1 This shows records of most columns as null
newDF.show()

But when I use Step 2 i.e cached dataframe to register table the data is shown as expected.

I have a big dynamo table and can't cache it!

@mkanchwala
Copy link

+1 Facing same issue on Amazon EMR as well.

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

2 participants