Skip to content

Commit

Permalink
Update 16-batch-systemfields.ipynb
Browse files Browse the repository at this point in the history
Added some refs, added a bit to the query.
  • Loading branch information
petermarshallio committed Jul 9, 2024
1 parent 724f6f3 commit a711db3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions notebooks/02-ingestion/16-batch-systemfields.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "0cb3b009-ebde-4d56-9d59-a028d66d8309",
"metadata": {},
"source": [
"# Incorporate system fields into table data\n",
"# Incorporate data from source systems into table data\n",
"<!--\n",
" ~ Licensed to the Apache Software Foundation (ASF) under one\n",
" ~ or more contributor license agreements. See the NOTICE file\n",
Expand All @@ -27,7 +27,7 @@
"\n",
"When doing ingestion from multiple sources, it can be helpful to incorporate specific information from the source of the data.\n",
"\n",
"For example, you may want to parse a file name to use as the primary or a secondary `__time` stamp.\n",
"For example, you might parse a source system URI using a [datetime function](https://druid.apache.org/docs/latest/querying/sql-scalar#date-and-time-functions) to use as the primary `__time` stamp.\n",
"\n",
"This tutorial demonstrates how to incorporate `systemFields` with batch ingestion to add this information to rows in your table."
]
Expand Down Expand Up @@ -176,7 +176,7 @@
"metadata": {},
"outputs": [],
"source": [
"Query the system fields that were ingested to see information about how each file was ingested:"
"Run the next cell to run a simple query that shows the results of the ingestion."
]
},
{
Expand All @@ -190,9 +190,10 @@
"SELECT\n",
" \"__file_uri\",\n",
" \"__file_path\", \n",
" \"__file_name\",\n",
" COUNT(*) AS \"total_file_rows\" \n",
"FROM \"{table_name}\"\n",
"GROUP BY 1,2\n",
"GROUP BY 1,2, 3\n",
"'''\n",
"\n",
"druid.display.sql(sql)"
Expand Down

0 comments on commit a711db3

Please sign in to comment.