Icon

01 Date and Time and Databases

Date and Time and Databases - Exercise

This workflow shows a hands-on exercise in the L2-DS Introduction to KNIME Analytics Platform for Data Scientists - Advanced course

Task 1: Date and Time Manipulation1. Read the New York City Airbnb data by executing the CSV Reader node2. Convert the timestamps in the last_review column from string to Date&Time3. Remove rows with missing values in the last_review column4. Remove the time values from the timestamps5. Extract the day of the week from each timestamp6. Count the number of last reviews on each day of the week Task 2: Database Data Manipulation1. Connect to the Accommodation.sqlite database available in the "data" folder2. Write the Airbnb data provided by the Modify Time node into the database. Create a table calledAB_NYC_2019. Overwrite it if it exists already.3. Perform the following data manipulation tasks with the appropriate DB nodes:- Calculate the average room price in each neighborhood group- Join the price information to the original database table- Filter the data to rooms/apartments with at least one review4. Read the joined and filtered data into KNIME Removed time valuesCount by weekdayRemoved rows with missing values in last_review columnRead AB_NYC_2019dataExtract day of week from timestampsJoined price info to originaldataFilter: rooms/apt with at least 1 reviewRead datainto KNIMECreate table:AB_NYC_2019 Avg priceneighborhood_groupRemove time String to Date&Time Modify Time GroupBy Sorter Missing Value CSV Reader Extract Date&TimeFields DB Joiner DB Row Filter DB Reader SQLite Connector DB Writer DB GroupBy Modify Time Task 1: Date and Time Manipulation1. Read the New York City Airbnb data by executing the CSV Reader node2. Convert the timestamps in the last_review column from string to Date&Time3. Remove rows with missing values in the last_review column4. Remove the time values from the timestamps5. Extract the day of the week from each timestamp6. Count the number of last reviews on each day of the week Task 2: Database Data Manipulation1. Connect to the Accommodation.sqlite database available in the "data" folder2. Write the Airbnb data provided by the Modify Time node into the database. Create a table calledAB_NYC_2019. Overwrite it if it exists already.3. Perform the following data manipulation tasks with the appropriate DB nodes:- Calculate the average room price in each neighborhood group- Join the price information to the original database table- Filter the data to rooms/apartments with at least one review4. Read the joined and filtered data into KNIME Removed time valuesCount by weekdayRemoved rows with missing values in last_review columnRead AB_NYC_2019dataExtract day of week from timestampsJoined price info to originaldataFilter: rooms/apt with at least 1 reviewRead datainto KNIMECreate table:AB_NYC_2019 Avg priceneighborhood_groupRemove timeString to Date&Time Modify Time GroupBy Sorter Missing Value CSV Reader Extract Date&TimeFields DB Joiner DB Row Filter DB Reader SQLite Connector DB Writer DB GroupBy Modify Time

Nodes

Extensions

Links