I have some code that iterates through a dataframe and creates data points and writes like so:
for index, row in final_df.iterrows():
dataType = row["dataType"]
name = row["topic_name"]
value = row["value"]
data = Point("topic") \
.tag("topic_name", name) \
.field(dataType, value)
write_api.write(bucket, org, data)
The dataType column contains different data type objects like so: Float, Int32, Int16, etc. This method of writing data works perfectly. However, it is slow. I want to write the whole dataframe as a batch, so I wrote the following code:
write_api.write(bucket=bucket, org=org, record=final_df, data_frame_measurement_name="topic", data_frame_tag_columns=["topic_name"])
This gives a 204 success response, however, I don't see the data flowing through. I suspect it has to do with the dataType column being passed as a string?