ilyasse05

Results 14 comments of ilyasse05

exemple of function delete(targetTable,sourceTable, [conditions columns])

@puneetsharma04, we need to do it in target table it self without intermediate dataframe and without returning new dataframe.

@MrPowers & @puneetsharma04 i'am not confortable with scala but i have code this and i test it `import io.delta.tables._ def deleteFromAnotherDataframe ( targetTableDelta: io.delta.tables.DeltaTable, sourceDF: org.apache.spark.sql.DataFrame, attrColNames: Seq[String] ) :...

@MrPowers this function is very useful, i think that we can add column like "violated_constraint" with the description of constraint and also return json ou array with : Nb_inserted_rows Nb_rejected_rows...

> def deleteFromAnotherDataframe ( targetTableDelta: io.delta.tables.DeltaTable, sourceDF: org.apache.spark.sql.DataFrame, attrColNames: Seq[String] ) : String = { > > val stagedUpdatesAttrs = attrColNames.map(attr => f"target.$attr = source.$attr").mkString(" AND ") targetTableDelta.alias("target") .merge( sourceDF.alias("source"),...

@brayanjuls & @puneetsharma04 this is a proposition of code : /** * this function allows to delete rows from a DeltaTable from rows of a dataframe with join of one...

@brayanjuls I'm not sure if i have access to do it !

thank you @brayanjuls i will try that i have an issu to use this code targetTableDelta.history(1).select("operationMetrics.numTargetRowsDeleted").as[String].first error : Unable to find encoder for type String. An implicit Encoder[String] is needed...

For this function, there is a lot of uses cases, but i have a question the role of this function is to give possibility to remove rows from result request...

@brayanjuls i have done a pull request with Unit Test and Readme https://github.com/MrPowers/jodie/pull/66 but i'am stilling not able to run the unit test with locally, do you have tuto for...