Skip to content

Commit

Permalink
probably fix bug I just introduced
Browse files Browse the repository at this point in the history
  • Loading branch information
lostmygithubaccount committed Sep 17, 2024
1 parent 15b3fc1 commit 21919ec
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/ibis_analytics/etl/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,13 @@ def docs(t):
def transform(t):
t = t.rename({"path": "2_path", "timestamp": "date"})
t = t.mutate(path=ibis._["path"].replace("/index.html", ""))
t = t.mutate(path=ibis._["path"].re_extract(r"^/posts/[^/]+", 0))
t = t.mutate(
path=ibis.ifelse(
ibis._["path"].startswith("/posts"),
ibis._["path"].re_extract(r"^/posts/[^/]+", 0),
ibis._["path"],
)
)
return t

docs = t.pipe(preprocess).pipe(transform).pipe(postprocess)
Expand Down

0 comments on commit 21919ec

Please sign in to comment.