Skip to content

Commit

Permalink
Fix docs after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
daniil-quix committed Nov 15, 2023
1 parent f4d913f commit ebe14ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions docs/streamingdataframe.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ app = Application(
)

# Define the input and output topics. By default, the "json" serialization will be used
input_topic = app.topic("my_input_topic")
output_topic = app.topic("my_output_topic")
input_topic = app.topic("input")
output_topic = app.topic("output")


def add_one(data: dict):
Expand Down Expand Up @@ -53,8 +53,8 @@ sdf = sdf[(sdf["field_0"] > 10) & (sdf["field_2"] != "test")]
# You may also use a custom function to filter data
sdf = sdf.filter(lambda v: v["field_0"] > 10 and v["field_2"] != "test")

# Apply custom function to transform the message
sdf = sdf.apply(add_one)
# Apply custom function to update values in place
sdf = sdf.update(add_one)

# Use a stateful function in persist data into the state store
# and update the message value
Expand Down Expand Up @@ -372,6 +372,8 @@ input_topic = app.topic("input", key_deserializer='str')
# Outgoing key will be serialized as a string too
output_topic = app.topic("my_output_topic", key_serializer='str')

sdf = app.dataframe(input_topic)

# Producing a new message to a topic with the same key
sdf = sdf.to_topic(output_topic)

Expand Down
Empty file.

0 comments on commit ebe14ff

Please sign in to comment.