Oracle by Example brandingAdding Calendar Data to the Object Store

section 0Before You Begin

In this 10-minute tutorial, you add some calendar data such as holidays to your data lake.

This is the 5th tutorial in the Storing and Analyzing Data with Big Data Cloud series. Perform the tutorials sequentially.

What Do You Need?


section 1Create a Calendar Dataset

Perform these steps to add some calendar data such as holidays and attributes to the Object Store.

  1. Copy code_snippet-c1.txt and paste it in the empty paragraph.
  2. Run the paragraph to create a temp view called holidays_temp.
    Running paragraph
    Description of the illustration c2.jpg
  3. Copy code_snippet-c3.txt and paste it in the next paragraph.
  4. Run the paragraph to retrieve data from weather_temp and holidays_temp.
    query output
    Description of the illustration c4.jpg
  5. Copy code_snippet-c5.txt and paste it in the next empty paragraph.
  6. Run the paragraph to retrieve information from weather_temp, holidays_temp and bike_trips_temp views.
    paragraph output
    Description of the illustration c6.jpg
  7. Copy code_snippet-c7.txt and paste it in the next paragraph.
  8. Run the paragraph to create a bike_trips_weather_parquet table.
    create table
    Description of the illustration c8.jpg
  9. Run the following query to retrieve bike trips based on day and weather.
    select cast(starttime as date) day, workday, precipitation, count(*)
    from bike_trips_weather_parquet
    group by cast(starttime as date), workday, precipitation
    order by day
    paragraph output
    Description of the illustration c9.jpg
  10. Run the following query to retrieve workday bike trips based on the start date and start hour.
    select startdate,  starthour, count(*)
    from (select starthour,
     startday_of_week,
     startdate
    from bike_trips_weather_parquet
    where workday="Workday"
    and (gender="${gender=Male,Male|Female|unknown}" )) bike_times
    group by startdate,  starthour
    paragraph output
    Description of the illustration c10.jpg

more informationWant to Learn More?