I have created an empty dataframe and then trying to add columns and values to the dataframe.
Dataset<Row> runMetadata = sparkSession.emptyDataFrame();
runMetadata = runMetadata.withColumn("record_count", lit(count));
runMetadata =
runMetadata.withColumn("start_time",lit(currTimestamp));
runMetadata.show();
count is long and currTimestamp is a timestamp.
But 'runMetadata.show()' is only showing the column names and no values. Also i am trying to save this dataframe in bigquery, there also no value is getting appended, also i am not seeing any errors in logs.