AbsaOSS / AbsaOSS/spline-spark-agent

Lineage Calculation not triggered when using Spark Connector for SQL Server BulkCopy API

Open
#58 3 comments 0 reactions 1 assignee Claimed by @cerveada View on GitHub
feature
Dominant language
Scala
Stars
210
Forks
102
Avg merge
1d 1h
Merged PRs (30d)
1

Description

When using the Spark Sql Server connector (https://github.com/Azure/azure-sqldb-spark), there are two ways to produce the final output:

One way the Spark SQL Connectior API works is by using the usual df.write style operation which triggers lineage via the "Save" action (see example below)

However, when calling df.bulkCopyToSqlDB (also shown below), no lineage is triggered as no action is produced at all by the bulkCopyToSqlDB method as it doesn't go through the usual .jdbc chain. Is there a way to force Spline to produce the lineage for the bulkCopyToSqlDB "terminal" operation?

val df = ...//Read from wherever

//Using the Spark Sql Server connector
val writeConfig = Config(Map(
"url" -> "databaseservername",
"databaseName" -> "catalogname",
"dbTable" -> "tablename",
"user" -> "user",
"password" -> "password"
))

//This is the Spark Sql Server connector API using the usual write technique.
df.write.mode(SaveMode.Append).sqlDB(writeConfig) //Lineage gets triggered

//Spark Sql Connector also allows for a custom bulk copy that doesn't go through .jdbc
df.bulkCopyToSqlDB(writeConfig) //No action and as a result no lineage

Thanks,
Harish.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.