Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Regis Kuckaertz
    @regiskuckaertz
    @sgurusam sorry for the delay. libraryDependencies += "org.scanamo" %% “scanamo-testkit" % "1.0.0-M9” is your guy.
    Dexter Legaspi
    @dalegaspi
    hi! i have a question...and perhaps this was explained somewhere and i just missed it...why is the exec() operation returns an Option[Either[...]] instead of just Either? in what instance does exec return a None? thanks!
    @dalegaspi wait..nm..it's in the front page of the doc...put() operations return a None
    Dmitry Avershin
    @dmitraver_twitter

    hi guys, I recently found an interesting issue which I can't really explain but maybe somebody here has seen something similar. I use tagless final with scanamo and cats interpreters with IO monad. I once added a new field to my case class and everything compiled fine but my application stuck completely during test run when IOs unsafeRunSync method was called so it looked like there is some kind of lock somewhere which prevented the tests from being finished. I spent some hours debugging this issue unless I was close to give up and tried to summon the DynamoFormat for my case class somewhere in code to just print it out, so I wrote

    implicitly[DynamoFormat[MyCaseClass]]

    and my tests went through... I was like wtf, I removed that line and it still worked even after "sbt clean". Then this issue happened some time later to my colleagues when we added more fields and run our web app locally, we tried to debug it this time to see what might be the problem but its a bit hard with these shapeless autoderivation, trampolining from IO and other stuff being lazy... The only thing we found that time was that asw sdk returned the result but then things stuck somewhere probably during decoding the response from aws sdk to case class. I applied the same trick with implicitly again and it solved the issue but I still have no idea whats going on here, its clear to me that it has something to do with derivation but I've never seen anything like that before. Has anybody seen something similar?

    Stephen Duncan Jr
    @jrduncans
    Is there a not-equal filter expression on query in Scanamo (<> in the filter-expression)?
    Regis Kuckaertz
    @regiskuckaertz
    @dmitraver_twitter sorry for the late reply. this is new 🤔 is it a blocker or can you work your way through it?
    @jrduncans something like table.given(Not(condition)) should work
    Dmitry Avershin
    @dmitraver
    @regiskuckaertz yes, 'sbt clean' actually solves the issue, looks like its a bug in sbt's incremental compiler that doesn't recompile shapeless macroses when case class changes sbt/zinc#249
    Stephen Duncan Jr
    @jrduncans
    Ok, so that’ll generate a NOT(foo = bar)instead of a foo <> bar. I think that works for me.
    Stephen Duncan Jr
    @jrduncans
    Maksym
    @ratoshniuk

    Hi there!

    can we limit offset using scanamo?

    Ayush Tiwari
    @AyushTiwary
    Hey all, What is the resolver for scanamo snapshot versions ?
    Regis Kuckaertz
    @regiskuckaertz
    @AyushTiwary answered on GH :smile: tag 1.0.0-M10 is out with the latest changes: stream alpakka client, DynamoValue and moving away from object interpreters
    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!