Skip to content

Commit 56b1272

Browse files
committed
wip(today's fortune): You are always busy.
1 parent 3b9db6d commit 56b1272

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

notion_pipeline.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,25 @@ def load_notion_data() -> None:
99
pipeline = dlt.pipeline(
1010
pipeline_name="notion_pipeline", destination="duckdb", dev_mode=DEV_MODE
1111
)
12+
13+
def column_name_projection(
14+
prop: DatabaseProperty, normalize: Callable[[str], str]
15+
) -> str:
16+
result_name = normalize(prop.name)
17+
if result_name in [
18+
"my_column_name",
19+
]:
20+
return None
21+
return result_name
22+
23+
my_db = DatabaseResource(
24+
database_id="12345678912345678912345678912345",
25+
column_name_projection=column_name_projection,
26+
)
27+
1228
data = source(
1329
limit=-1 if not DEV_MODE else 1,
30+
databases=[my_db],
1431
)
1532
info = pipeline.run(
1633
data,

0 commit comments

Comments
 (0)