Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Liam Stewart
    @liamstewart
    Is there support for if_not_exists in updates (per https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.UpdateExpressions.html#Expressions.UpdateExpressions.SET.PreventingAttributeOverwrites)? Looked through the code and my reading is "no". Would it be reasonable to add a setIfNotExists method to UpdateExpression and then plumbing it through?
    Regis Kuckaertz
    @regiskuckaertz
    @liamstewart definitely! would you be open to raise a PR?
    Manjot Kaur
    @manjotmona

    Hey @regiskuckaertz
    Is there a way to change the format for case class objects explicitly ?

    I have case class as follow
    case class Sample(paraName : paraValue)
    But column name in DynamoDB that I have in CAPITAL_SNAKE_CASE format i.e.(PARA_NAME)

    Shayan Zadeh
    @shayangz
    has there been a change on treatment of Map.empty in 1.0.0-M10? We are seeing errors of not of type: 'M' was 'DynNull' when reading a Map.empty value back out
    Shayan Zadeh
    @shayangz
    filed issue scanamo/scanamo#433 with more detail
    Regis Kuckaertz
    @regiskuckaertz
    @shayangz thanks, yes def a regression will address asap. thanks a lot for reporting :pray:
    @manjotmona you can totally write your own DynamoFormat[Sample]:
    new DynamoFormat[Sample]{ 
      def write(v: Sample) = DynamoValue.fromFields(‘CAPITAL_SNAKE_CASE’, DynamoValue.fromString(v.paraName))
      def read(dv: DynamoValue) = (for {
        o <- dv.asObject
        p <- o(‘CAPITAL_SNAKE_CASE’)
      } yield Sample(p)).toEither(MissingProperty)
    Leif Battermann
    @battermann
    Hi, how do I specify the sort key, when I put a record into dynamo db?
    Regis Kuckaertz
    @regiskuckaertz
    @battermann assuming you have a tabe: Table[A], and x: A, then x will contain values for the partition and sort keys, so table.put(x) is fine.
    Harsh Gupta
    @hardmettle_gitlab
    cant seem to fix
     could not find implicit value for parameter exported: org.scanamo.export.Exported[org.scanamo.DynamoFormat[...]
    Regis Kuckaertz
    @regiskuckaertz
    @hardmettle_gitlab make sure to import org.scanamo.auto._
    Leif Battermann
    @battermann
    @regiskuckaertz ok, thank you
    Ayush Tiwari
    @AyushTiwary
    I start facing an error with M10 in the DynamoFormat which is working well till M8
    Cause: spray.json.JsonParser$ParsingException: Unexpected end-of-input at input index 0 (line 1, position 1), expected JSON Value
    Regis Kuckaertz
    @regiskuckaertz
    Can you please create a GH issue with a reproducible test case?
    Ayush Tiwari
    @AyushTiwary
    Okay, Will do that.
    David Kelly
    @kellydavid
    Hey, any idea when the next version of scanamo will be released? Very interested in the changes in scanamo/scanamo#432 (upgrading the ZIO dependencies)
    cool4lion
    @cool4lion
    How can I make pagination work with index
    Ayush Tiwari
    @AyushTiwary
    how can we apply filter to check the value of optional field ?
    As right now when I tried with optional value, then I got the following error
    Invalid FilterExpression: An expression attribute value used in expression is not defined; attribute value: :and_l_and_l_and_l_and_r_conditionAttributeValue0 (Service: dynamodb; Status Code: 400; Error Code: ValidationException; Request ID: 787abdcf-70cf-4a8e-ba2a-5ae9be1310cf
    Regis Kuckaertz
    @regiskuckaertz
    @kellydavid have two big updates in the pipeline that I want to get through, hoping to be done in the course of next month
    @AyushTiwary can you post a snippet of code please?
    Ayush Tiwari
    @AyushTiwary
    @regiskuckaertz Thanks a lot. But I think it resolved. I was just making the incorrect query.
    Regis Kuckaertz
    @regiskuckaertz
    @AyushTiwary one day, one day, the compiler will prevent you from writing invalid queries :muscle:
    mdulac-photobox
    @mdulac-photobox
    Hello there !
    I've tried for hours to make a simple query with Scanamo, but I didn't succeed.
    I would live to make a query with a constraint on a column : the value must be in a set.
    I tried something like : usageIndex.query('PhotoId -> ids.map(_.value)) but that returns no result at all.
    There's an implicit method creating a ConditionExpression[(AttributeName, Set[V])], so I'm running this way...
    If you have time to help me, I really appreciate ! Thank you
    Regis Kuckaertz
    @regiskuckaertz
    hi @mdulac-photobox ! is PhotoId the partition key?
    mdulac-photobox
    @mdulac-photobox
    Yes, the partition key of the secondary index
    My request works if I write something like usageIndex.query('PhotoId -> "123"), but can't work with a set of values. I tried to build an Or Condition from my ids list, but I failed also
    Regis Kuckaertz
    @regiskuckaertz
    mdulac-photobox
    @mdulac-photobox
    It already is.
    For example : I want to request all the rows for ids "1", "2," and "3". Kind of : id IN ("1", "2", "3"). I wanted to build a condition with scanamo like 'PhotoId -> "1" or 'PhotoId -> "2" or 'PhotoId -> "3". Is this possible ?
    Regis Kuckaertz
    @regiskuckaertz
    ha, sorry I didn;t understand initially. yes it is with Table#filter: usageIndex.filter(‘PhotoIn -> Set(1, 2, 3)).scan() (a condition expression such as x IN xs can only be applied as a filter)
    mdulac-photobox
    @mdulac-photobox
    Ok thank you Regis, I will have a try tomorrow ! So I guess I have no other choice that use the Scan API. I would prefer using Query API for a performance reason.
    mdulac-photobox
    @mdulac-photobox
    The request works, thank you !
    I will make a request to our AWS technical account manager for the performance questioning.
    Thank you Regis.
    Fabio Labella
    @SystemFw
    Hey people, just wondering is there were any plans for a milestone release any time soon? There are a couple of bugs wrt empty maps and empty arrays being serialised as NULL which have bitten us and have been fixed in master already. Thanks for your time :)
    Regis Kuckaertz
    @regiskuckaertz
    I’ll finish work on the *AndReturn APIs then release another milestone, hoping to get this done by end of week.
    Fabio Labella
    @SystemFw
    thanks a lot!
    wrbriggs
    @wrbriggs
    I have a ridiculously basic question about Scanamo - I'm trying to use ScanamoAlpakka in order to get a akka.stream.scaladsl.Source, and the Scaladoc says this is possible, depending on the "kind of execution used" - I can't find any examples in the docs, and am struggling a bit. Has anyone done this, and if so, where can I find the docs on how to do it?
    Drew Boardman
    @drewboardman
    started running into this could not find implicit value for parameter exported: org.scanamo.export.Exported
    i have
    import org.scanamo.semiauto._
    import org.scanamo.syntax._
    i think it's because my type has Instant in it
    eh, removed Instant and it still doesn't like it
    Drew Boardman
    @drewboardman
    does scanamo have an issue with storing ADTs in a table?
    like if i have
    sealed trait Thing
    
    case class Foo(a: Int, b: String) extends Thing
    case class Bar(a: Long, b: String, c: Int) extends Thing
    
    val thingTable: Table[Thing] = Table[Thing]("thing_table")(deriveDynamoFormat[Thing])
    Drew Boardman
    @drewboardman
    @regiskuckaertz
    Drew Boardman
    @drewboardman
    So I'm getting closer to the issue, but it's go to do with ambiguous implicits
    genericProduct | genericCoProduct
    both are in scope
    if I provide one explicitly I see could not find implicit value for parameter gen: shapeless.LabelledGeneric.Aux[T,R]
    here is a reproduction