Comments (10)
Hi,
We’ll take a look after New Year’s.
from spark-dynamodb.
Hi @juanyunism, I've shamelessly taken the code and commit it. It works fine. Do you need a new release now, or can you wait until we get more stuff in?
from spark-dynamodb.
I wrote this test to reproduce the problem.
import com.amazonaws.services.dynamodbv2.document.Item
import com.amazonaws.services.dynamodbv2.model.{
AttributeDefinition,
CreateTableRequest,
KeySchemaElement,
ProvisionedThroughput
}
import com.audienceproject.spark.dynamodb.implicits._
class TestNullBoolean extends AbstractInMemoryTest {
test("Test Null") {
dynamoDB.createTable(
new CreateTableRequest()
.withTableName("TestNullBoolean")
.withAttributeDefinitions(new AttributeDefinition("Pk", "S"))
.withKeySchema(new KeySchemaElement("Pk", "HASH"))
.withProvisionedThroughput(new ProvisionedThroughput(5L, 5L))
)
val table = dynamoDB.getTable("TestNullBoolean")
for ((_pk, _type, _value) <- Seq(
("id1", "type1", true),
("id2", "type2", null)
)) {
if (_type != "type2") {
table.putItem(
new Item()
.withString("Pk", _pk)
.withString("Type", _type)
.withBoolean("Value", _value.asInstanceOf[Boolean])
)
} else {
table.putItem(
new Item()
.withString("Pk", _pk)
.withString("Type", _type)
.withNull("Value")
)
}
}
val df = spark.read.dynamodbAs[BooleanClass]("TestNullBoolean")
import spark.implicits._
df.where($"Type" === "type2").show()
client.deleteTable("TestNullBoolean")
}
}
case class BooleanClass(Pk: String, Type: String, Value: Boolean)
from spark-dynamodb.
I used this in my build.sbt
to use the latest changes.
lazy val root = (project in file(".")).dependsOn(depProject)
lazy val depProject = ProjectRef(
uri("git://github.com/audienceproject/spark-dynamodb.git#master"),
"spark-dynamodb"
)
from spark-dynamodb.
Hi @cosmincatalin, thank you for the quick response :).
Don't worry, release when you get more stuff in. Can you provide me the branch with the fix so I can download and build it to try it locally?
Thanks in advance.
from spark-dynamodb.
Nevermind, just found it in master 😃
from spark-dynamodb.
Hi @cosmincatalin, is there any possibility you could cut a release with this fix included?
from spark-dynamodb.
Sure, I’ll make a release before this weekend.
from spark-dynamodb.
Released in 1.0.3
from spark-dynamodb.
Thank you @cosmincatalin!
from spark-dynamodb.
Related Issues (20)
- v1.0.4 on Maven is incorrect.
- DynamoDB load always uses full scan instead of the specified global secondary index in Python
- NoClassDefFoundError on Java8 JFunction
- ClassNotFoundException: com.audienceproject.spark.dynamodb.datasource.DynamoWriterFactory
- AWS token can expire during job
- Null Pointer Exception with version 1.1.2 HOT 1
- IllegalArgumentException: No region provided HOT 1
- Getting started HOT 1
- NPE while trying to connect to a LSI of a table from TableIndexConnector HOT 1
- In python following readme example but unable to print out any data HOT 3
- how to store dataframe in dynamodb
- Caused by: com.amazonaws.services.dynamodbv2.model.AmazonDynamoDBException: The provided key element does not match the schema HOT 2
- Projection pushdown feature similar to Filter pushdown HOT 1
- Incomplete schema inference while reading from DynamoDB table HOT 3
- How to import the module in pyspark? HOT 1
- Error when trying to write pyspark dataframe to DynamoDB HOT 1
- Error when load small amount of data on large cluster
- Nullpointer Exception when Try to write dataframe to Dynamodb
- How to import the module in AWS Glue PySpark
- DynamoDB's write mode is batch mode, but option "update" is "true" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spark-dynamodb.