Hive Create External Table: Syntax & Examples
- Average speed
- km/h
- Result
- Finish time
- 50 min
- You entered
- Distance
- 10 km
- You entered
Yes, you can create an external table in Hive with the CREATE EXTERNAL TABLE statement. This tells Hive that the table’s data lives outside the Hive warehouse (e.g., in HDFS, S3, or a local filesystem) and that dropping the table should not delete the underlying files. You define the schema, location, and format, and Hive reads the data from that path every time you query it.
Formula
The calculator above works out your average running pace and speed. The formulas are:
- Pace = Finish time (minutes) ÷ Distance (km) → result in min/km
- Speed = Distance (km) ÷ (Finish time (minutes) ÷ 60) → result in km/h
Where:
- Finish time is the total time taken, in minutes.
- Distance is the distance covered, in kilometres.
- Pace is the time per kilometre, in minutes per kilometre.
- Speed is the average speed, in kilometres per hour.
Worked Example
Using the default values from the calculator: finish time = 50 minutes, distance = 10 km.
- Pace = 50 ÷ 10 = 5.00 min/km
- Speed = 10 ÷ (50 ÷ 60) = 10 ÷ 0.8333 = 12.00 km/h
The calculator shows a pace of 5.00 min/km and a speed of 12.00 km/h for those inputs.
When to Use This Calculator
Use this tool when you have completed a run, jog, walk, or cycle and want to know your average pace or speed. It is especially useful for training runs where you know the distance and total time, and you want to compare efforts across different routes or workouts.
You can also use it in reverse: if you have a target pace and distance, you can work out the expected finish time. For example, a 10 km race at 5:30 min/km would take 55 minutes.
How to Read the Result
The pace is shown in minutes per kilometre. A lower pace means you are faster (less time per kilometre). The speed is shown in kilometres per hour; a higher speed means you are faster. These two numbers are inversely related – if your pace improves (drops), your speed increases.
For US customary units, you can convert: 1 mile = 1.60934 km. So a pace of 5 min/km equals about 8 min/mile. The calculator uses metric by default, but you can enter distance in miles and then multiply the result by 1.60934 to get min/mile, or use the speed in mph by dividing km/h by 1.60934.
Common Mistakes
- Mixing units: Entering distance in miles but expecting a min/km pace. Convert to km first, or convert the result.
- Using seconds: The calculator expects minutes. If you ran 50 minutes and 30 seconds, enter 50.5, not 50.30.
- Rounding too early: If you round the pace to 5.0 and then use that to calculate speed, you may get a slightly different answer. Use the full precision until the final step.
Limitations of the Formula
This calculator assumes a constant pace throughout the entire distance. In reality, your pace varies due to terrain, weather, and fatigue. The result is an average, not a segment-by-segment breakdown. It also does not account for elevation gain or loss, which can make the same pace feel harder or easier.
For walking, the same formulas apply. For cycling, speed is usually more relevant than pace, but the calculator can still give you both.
Frequently Asked Questions
What is a good running pace for a beginner?
A common beginner pace is around 6:30 to 7:30 min/km (10:30 to 12:00 min/mile). That corresponds to a speed of roughly 8 to 9 km/h. It’s more important to maintain a conversational effort than to hit a specific number.
How do I convert min/km to min/mile?
Multiply the pace in min/km by 1.60934. For example, 5 min/km × 1.60934 = 8.05 min/mile. Alternatively, use the speed: divide 60 by the pace in min/km to get km/h, then divide by 1.60934 to get mph.
Can I use this for a treadmill workout?
Yes. If the treadmill shows speed in km/h, you can enter the distance and time to get your pace. If it shows pace directly, you can use the calculator to verify it.
What if I run on a track where distance is in meters?
Convert meters to kilometres first. For example, 400 meters = 0.4 km. Then enter that as the distance. The calculator will give you pace per km, which you can then compare to your usual pace.
Does this calculator work for walking or hiking?
Yes, it works for any activity where you know the distance and time. Walking pace is typically 10–15 min/km, and hiking can be even slower depending on terrain.
Related
Formula used
in t | Finish time | min | 50 | 0 in d | Distance | km | 10 | 0 out pace | Average pace | min/km | t / d | 2 out speed | Average speed | km/h | d / (t / 60) | 2
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.