In my pyspark code im reading test csv file, filtering it, and writing. All that actions i can see in console with LoggingLineageDispatcher
in json
format, but i want to find a way to get this data right in my python code. Cant find any options for that.
My pyspark
code:
session = create_spark_session()
test_df: DataFrame = session.read.csv(
"test.csv",
sep =',',
header = True
)
mc_df = test_df.filter(col("Card Type Code") == "MC")
mc_df.write.csv("mc.csv")
session.stop()
Im running it with
spark-submit \
--packages za.co.absa.spline.agent.spark:spark-3.2-spline-agent-bundle_2.12:0.7.8 \
--conf "spark.sql.queryExecutionListeners=za.co.absa.spline.harvester.listener.SplineQueryExecutionListener" \
--conf "spark.spline.lineageDispatcher=logging" \
spline_test.py
Example of console output, that i want get in python code:
22/05/27 18:52:50 INFO LoggingLineageDispatcher: ["plan",{"id":"8408ed4b-2f96-5076-
aaab-59ac3beb7568","name":"spline_test.py","operations":{"write":
{"outputSource":"mc.csv","append":false,"id":"op-
0","name":"InsertIntoHadoopFsRelationCommand","childIds":["op-1"],"params":{"path"....