bigquery 教程_bigquery挑戰實驗室教程從數據中獲取見解

bigquery 教程

This medium article focusses on the detailed walkthrough of the steps I took to solve the challenge lab of the Insights from Data with BigQuery Skill Badge on the Google Cloud Platform (Qwiklabs). I got access to this lab in the Google Cloud Ready Facilitator Program. Thanks to Google!

這篇中篇文章重點介紹了我為解決Google Cloud Platform( Qwiklabs )上的BigQuery Skill Badge數據見解挑戰實驗室而采取的步驟的詳細演練。 我可以通過Google Cloud Ready Facilitator計劃訪問此實驗室。 感謝Google!

Till now, I have completed over 100 labs and 23 quests on Qwiklabs. Below is the reference of my profile.

到目前為止,我已經完成了100多個實驗室和Qwiklabs上的23個任務 。 以下是我的個人資料參考。

This lab is only recommended for students who have completed the labs in the Insights from Data with BigQuery Quest. Knowledge of SQL and BigQuery is also needed to solve this challenge lab. Are you up for the challenge? Let’s go!

僅向在使用BigQuery Quest進行數據洞察中完成實驗的學生推薦該實驗。 的知識 解決此挑戰實驗室也需要SQL BigQuery你準備好接受挑戰了嗎? 我們走吧!

使用的數據集 (Dataset Used)

The dataset that we would be using in this challenge lab is bigquery-public-data.covid19_open_data.covid19_open_data. This dataset contains data related to covid-19 on a country basis globally. We would be using this in this skill badge tutorial.

我們將在此挑戰實驗室中使用的數據集為bigquery-public-data.covid19_open_data.covid19_open_data。 該數據集包含全球基于國家/地區與covid-19相關的數據。 我們將在本技能徽章教程中使用它。

BigQuery Tutorial can be found on the reference below:

可以在以下參考資料中找到BigQuery教程:

挑戰場景 (Challenge Scenario)

There are 10 small tasks in this challenge lab, all of which should be completed to score 100/100. In order to pass the lab, there are 9 SQL commands and 1 Data Studio report that should be generated in order to score 100. This tutorial list out the steps I took to solve all the ten challenges within the lab. The ten tasks are as follows:

這個挑戰實驗室中10個小任務 ,所有這些小任務都應得分為100/100。 為了通過實驗室,應生成9條SQL命令和1個Data Studio報告才能獲得100分。本教程列出了我為解決實驗室中的所有十個挑戰而采取的步驟。 十個任務如下:

  1. Building a SQL query that outputs the total no. of confirmed cases.

    建立一個SQL查詢,輸出總編號。 確診病例。

  2. Building a SQL query that outputs the worst affected areas.

    構建一個SQL查詢以輸出受影響最嚴重的區域。

  3. Building a SQL query that identifies the Hotspots in USA.

    建立一個SQL查詢來標識美國熱點。

  4. Building a SQL query that outputs the Fatality Ratio.

    建立一個輸出致命率SQL查詢

  5. Building a SQL query that identifies a specific day according to the constraints.

    建立一個SQL查詢來根據約束條件確定特定的一天

  6. Building a SQL query that outputs the number of days with zero net new cases.

    建立一個SQL查詢,以輸出凈新案例為零的天數。

  7. Building a SQL query that outputs the Doubling Rate.

    建立一個輸出雙倍速率SQL查詢

  8. Building a SQL query that outputs the Recovery Rate.

    構建一個輸出恢復率SQL查詢

  9. Building a SQL query that outputs the CDGR — Cumulative Daily Growth Rate.

    構建一個輸出CDGRSQL查詢-累積每日增長率。

  10. Creating a Datastudio report.

    創建一個Datastudio報告。

重要的提示 (Important Note)

Before starting this lab, ensure that you do whatever is required. Allocating more resources or doing something that is not required may lead to blocking of account by qwiklabs admin. Doing something other than that required in the lab results in account blocked by qwiklabs. Don’t worry. I came across this problem. The account can easily be unblocked by contacting qwiklabs support within a second.

在開始本實驗之前,請確保您執行所需的任何操作。 分配更多資源或執行不必要的操作可能會導致qwiklabs管理員阻止帳戶。 如果執行實驗室中未要求的操作,則會導致qwiklabs阻止帳戶。 不用擔心 我遇到了這個問題。 一秒鐘內聯系qwiklabs支持人員即可輕松解除帳戶鎖定。

加載數據集 (Loading the Dataset)

  1. In the cloud console, once logged in completely, Go to Menu > BigQuery.

    在云控制臺中,一旦完全登錄,請轉到菜單> BigQuery。

  2. Click + Add Data and then click on Explore Public Datasets from the left pane.

    單擊+添加數據 ,然后從左窗格中單擊探索公共數據集

  3. Search covid19_open_data and then select “Covid-19 Open Data”. Click on View Dataset to explore more!

    搜索covid19_open_data ,然后選擇“ Covid-19 Open Data”。 單擊查看數據集以探索更多內容!

  4. Use filter and locate the table covid19_open_data under the covid19_open_data dataset.

    使用過濾器并在covid19_open_data下找到表covid19_open_data 數據集。

Image for post
Image by Wynn Pointaux on Pixabay
該圖片由Wynn Pointaux在Pixabay上發布

任務詳細教程— 1 (Detailed Tutorial of Task — 1)

In task 1 it requires the user to execute a query that outputs the total count of confirmed cases on Apr 15, 2020. The output should contain only a single row containing the sum of confirmed cases across all the countries in the dataset. total_cases_worldwide should be the name of the column.

在任務1中,它要求用戶執行查詢,以輸出2020年4月15日確診病例的總數 。輸出應僅包含一行,其中包含數據集中所有國家/地區的確診病例的總數。 total_cases_worldwide應該是列的名稱。

Copy the below query in the query editor and click on RUN.

在查詢編輯器中復制以下查詢,然后單擊“ 運行”。

SELECTSUM(cumulative_confirmed) AS total_cases_worldwideFROM
`bigquery-public-data.covid19_open_data.covid19_open_data`WHERE
date = "2020-04-15"

任務詳細教程— 2 (Detailed Tutorial of Task — 2)

Task 2 requires to build a query for extracting the result of: “How many states in the US had more than 100 deaths on Apr 10, 2020?” The output should have the field name as count_of_states.

任務2需要構建一個查詢來提取以下結果:“ 到2020年4月10日,美國有多少州的死亡人數超過100? 輸出的字段名稱應為count_of_states。

Hint: We don’t have to include NULL values.(Important)

提示:我們不必包含NULL值。(重要)

Copy the below query in the query editor and click on RUN.

在查詢編輯器中復制以下查詢,然后單擊“ 運行”。

SELECTCOUNT(*) AS count_of_statesFROM (SELECT
subregion1_name AS state,SUM(cumulative_deceased) AS death_countFROM
`bigquery-public-data.covid19_open_data.covid19_open_data`WHERE
country_name="United States of America"AND date='2020-04-10'AND subregion1_name IS NOT NULLGROUP BY
subregion1_name
)WHERE death_count > 100

任務詳細教程— 3 (Detailed Tutorial of Task — 3)

Writing a query that will output the result of: “List all the states in the United States of America that had more than 1000 confirmed cases on Apr 10, 2020?” The output should have two columns named state and total_confirmed_cases that corresponds to State Name and the confirmed cases arranged in descending order.

編寫查詢將輸出以下結果:“ 列出2020年4月10日美國確診病例超過1000的所有州? ”輸出應具有名為statetotal_confirmed_cases的兩列,分別對應于State Name和已確認的個案,它們以降序排列。

Copy the below query in the query editor and click on RUN.

在查詢編輯器中復制以下查詢,然后單擊“ 運行”。

SELECT
subregion1_name AS state,SUM(cumulative_confirmed) AS total_confirmed_casesFROM
`bigquery-public-data.covid19_open_data.covid19_open_data`WHERE
country_name="United States of America"AND date = "2020-04-10"GROUP BY subregion1_nameHAVING total_confirmed_cases > 1000ORDER BY total_confirmed_cases DESC

任務詳細教程— 4 (Detailed Tutorial of Task — 4)

Building a query in the query editor that will answer the following question: “What was the case-fatality ratio in Italy for the month of April 2020?

在查詢編輯器中構建一個查詢,該查詢將回答以下問題: “意大利2020年4月的病死率是多少?

Case-fatality ratio is defined as (total deaths / total confirmed cases) * 100. The output should have three columns named total_confirmed_cases, total_deaths and case_fatality_ratio.

病死率定義為(總死亡人數/確診病例總數)*100 。輸出應具有三列,分別稱為total_confirmed_casestotal_deaths和case_fatality_ratio

Copy the below query in the query editor and click on RUN.

在查詢編輯器中復制以下查詢,然后單擊“ 運行”。

SELECT SUM(cumulative_confirmed) AS total_confirmed_cases, SUM(cumulative_deceased) AS total_deaths, (SUM(cumulative_deceased)/SUM(cumulative_confirmed))*100 AS case_fatality_ratioFROM `bigquery-public-data.covid19_open_data.covid19_open_data`WHERE country_name="Italy" AND date BETWEEN "2020-04-01" AND "2020-04-30"

任務詳細教程— 5 (Detailed Tutorial of Task — 5)

Building a query that will answer the following question: “On what day did the total number of deaths cross 10000 in Italy?

建立一個查詢,將回答以下問題:“ 意大利的總死亡人數在哪一天超過10000?

The query should output the date with a column name “date” and in the format “yyyy-mm-dd”.

查詢應以列名稱“ date”和格式“ yyyy-mm-dd”輸出日期。

Copy the below query in the query editor and click on RUN.

在查詢編輯器中復制以下查詢,然后單擊“ 運行”。

SELECT
dateFROM
`bigquery-public-data.covid19_open_data.covid19_open_data`WHERE
country_name = 'Italy'AND cumulative_deceased > 10000ORDER BY dateLIMIT 1

任務詳細教程— 6 (Detailed Tutorial of Task — 6)

The query given should be updated to output the correct number of days in India between 21 Feb 2020 and 15 March 2020 when there were zero increases in the number of confirmed cases.

給出的查詢應進行更新,以輸出2020年2月21日至2020年3月15日之間印度的正確天數,此時確診病例數增加為零。

Copy the below query in the query editor and click on RUN.

在查詢編輯器中復制以下查詢,然后單擊“ 運行”。

WITH india_cases_by_date AS (SELECT
date,SUM(cumulative_confirmed) AS casesFROM
`bigquery-public-data.covid19_open_data.covid19_open_data`WHERE
country_name="India"AND date between '2020-02-21' and '2020-03-15'GROUP BY
dateORDER BY
date ASC
)
, india_previous_day_comparison AS
(SELECT
date,
cases,
LAG(cases) OVER(ORDER BY date) AS previous_day,
cases - LAG(cases) OVER(ORDER BY date) AS net_new_casesFROM india_cases_by_date
)SELECTCOUNT(date)FROM
india_previous_day_comparisonWHERE
net_new_cases = 0

任務詳細教程— 7 (Detailed Tutorial of Task — 7)

Using the query that we ran in Task 6 as a template, the user has to build a query to find out the dates on which the confirmed cases increased by more than 10% compared to the previous day in the US between the dates March 22, 2020 and April 20, 2020.

使用我們在任務6中運行的查詢作為模板,用戶必須構建查詢以找出確認的病例比3月22日在美國的前一天增加了10%以上的日期, 2020年和2020年4月20日。

There should be four columns named Date, Confirmed_Cases_On_Day, Confirmed_Cases_Previous_Day and Percentage_Increase_In_Cases.

應該有四列,分別命名為DateConfirmed_Cases_On_DayConfirmed_Cases_Previous_DayPercentage_Increase_In_Cases

Copy the below query in the query editor and click on RUN.

在查詢編輯器中復制以下查詢,然后單擊“ 運行”。

WITH us_cases_by_date AS (SELECT
date,SUM( cumulative_confirmed ) AS casesFROM
`bigquery-public-data.covid19_open_data.covid19_open_data`WHERE
country_name="United States of America"AND date between '2020-03-22' and '2020-04-20'GROUP BY
dateORDER BY
date ASC
)
, us_previous_day_comparison AS
(SELECT
date,
cases,
LAG(cases) OVER(ORDER BY date) AS previous_day,
cases - LAG(cases) OVER(ORDER BY date) AS net_new_cases,
(cases - LAG(cases) OVER(ORDER BY date))*100/LAG(cases) OVER(ORDER BY date) AS percentage_increaseFROM us_cases_by_date
)SELECT
Date,
cases AS Confirmed_Cases_On_Day,
previous_day AS Confirmed_Cases_Previous_Day,
percentage_increase AS Percentage_Increase_In_CasesFROM
us_previous_day_comparisonWHERE
percentage_increase > 10

任務詳細教程— 8 (Detailed Tutorial of Task — 8)

Building a query to list the recovery rates of countries on the date May 10, 2020 with only those countries having more than 50K confirmed cases and output arranged in descending order (limit to 10). The name of the columns in the output should be as country, recovered_cases, confirmed_cases, recovery_rate in order to score full marks.

生成查詢以列出2020年5月10日的國家的恢復率,只有那些確認病例和產量超過5萬的國家/地區以降序排列(限制為10個)。 在輸出列的名稱應為國家 ,recovered_cases,confirmed_cases,recovery_rate才能得滿分。

Copy the below query in the query editor and click on RUN.

在查詢編輯器中復制以下查詢,然后單擊“ 運行”。

WITH cases_by_country AS (SELECT
country_name AS country,SUM(cumulative_confirmed) AS cases,SUM(cumulative_recovered) AS recovered_casesFROM
`bigquery-public-data.covid19_open_data.covid19_open_data`WHERE
date="2020-05-10"GROUP BY
country_name
)
, recovered_rate AS (SELECT
country, cases, recovered_cases,
(recovered_cases * 100)/cases AS recovery_rateFROM
cases_by_country
)SELECT country, cases AS confirmed_cases, recovered_cases, recovery_rateFROM
recovered_rateWHERE
cases > 50000ORDER BY recovery_rate DESCLIMIT 10

任務詳細教程— 9 (Detailed Tutorial of Task — 9)

Building a query that outputs the correct CDGR in the correct format. The CDGR or Cumulative Daily Growth Rate is calculated as:

建立一個以正確格式輸出正確CDGR的查詢。 CDGR或累計每日增長率計算為:

((last_day_cases/first_day_cases)^1/days_diff)-1)

((last_day_cases/first_day_cases)^1/days_diff)-1)

Where last_day_cases, first_day_cases and days_diff is given as:

其中last_day_cases,first_day_cases和days_diff給出為:

  • last_day_cases corresponds to the number of confirmed cases on May 10, 2020

    last_day_cases對應于2020年5月10日的確診病例數

  • first_day_cases corresponds to the number of confirmed cases on Feb 02, 2020

    first_day_cases對應于2020年2月2日的確診病例數

  • days_diff corresponds to the number of days between Feb 02 - May 10, 2020

    days_diff對應于2020年2月2日至5月10日之間的天數

Copy the below query in the query editor and click on RUN.

在查詢編輯器中復制以下查詢,然后單擊“ 運行”。

WITH
france_cases AS (SELECT
date,SUM(cumulative_confirmed) AS total_casesFROM
`bigquery-public-data.covid19_open_data.covid19_open_data`WHERE
country_name="France"AND date IN ('2020-01-24',
'2020-05-10')GROUP BY
dateORDER BY
date)
, summary as (SELECT
total_cases AS first_day_cases,
LEAD(total_cases) OVER(ORDER BY date) AS last_day_cases,
DATE_DIFF(LEAD(date) OVER(ORDER BY date),date, day) AS days_diffFROM
france_casesLIMIT 1
)select first_day_cases, last_day_cases, days_diff, POWER(last_day_cases/first_day_cases,1/days_diff)-1 as cdgrfrom summary

任務詳細教程— 10 (Detailed Tutorial of Task — 10)

For creating the Data Studio report, a number of steps should be followed.

要創建Data Studio報表,應遵循許多步驟。

1. First of all, Copy the below query in the query editor and click on RUN.

1.首先,在查詢編輯器中復制以下查詢,然后單擊“ 運行”。

SELECT
date, SUM(cumulative_confirmed) AS country_cases,SUM(cumulative_deceased) AS country_deathsFROM
`bigquery-public-data.covid19_open_data.covid19_open_data`WHERE
date BETWEEN '2020-03-15'AND '2020-04-30'AND country_name='United States of America'GROUP BY date

2. Click on EXPLORE DATA > Explore with Data Studio.

2.單擊探索 數據 > 使用Data Studio探索

3. Give access to Data Studio and authorize it to control BigQuery.

3.授予對Data Studio的訪問權限,并授權它控制BigQuery。

If you fail to create a report for the very first time login of Data Studio, click + Blank Report option and accept the Terms of Service. Then, go back again to BigQuery page and click Explore with Data Studio again.

如果您第一次登錄Data Studio時未能創建報告,請單擊+空白報告選項并接受服務條款。 然后,再次返回BigQuery頁面,然后再次單擊“使用Data Studio探索”

4. Create a new Time series chart in the new Data Studio report by selecting Add a chart > Time series Chart.

4.通過選擇新的Data Studio報告創建一個新的時間序列圖表 添加圖表 > 時間序列圖

5. Add country_cases and country_deaths to the Metric field.

5.將country_casescountry_deaths添加到“ 度量”字段。

6. Click Save to commit the change.

6.單擊保存以提交更改。

恭喜!! (Congratulations!!)

This is the skill badge I got after completing this challenge lab :P

這是完成挑戰實驗后獲得的技能徽章:P

Image for post
Google Cloud — Skill Badge (Image by author)
Google Cloud —技能徽章(作者提供的圖片)

With this, we have come to the end of this challenge lab. Thanks for reading this and following along. Hope you loved it! Bundle of thanks for reading it!

至此,我們已經到了挑戰實驗室的終點。 感謝您閱讀并繼續。 希望你喜歡它! 捆綁感謝您閱讀!

My Portfolio and Linkedin :)

我的投資組合和Linkedin :)

翻譯自: https://medium.com/swlh/insights-from-data-with-bigquery-challenge-lab-tutorial-f868992ef9dc

bigquery 教程

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/389757.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/389757.shtml
英文地址,請注明出處:http://en.pswp.cn/news/389757.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

學習linux系統到底有沒捷徑?

2019獨角獸企業重金招聘Python工程師標準>>> 說起linux操作系,可能對于很多不了解的人來說,第一個想到的就是類似于黑客帝國中的黑框框以及一串串不知所云的代碼,總之這些感覺都可以總結成為一個字,那就是——酷&#…

機器學習之路:python k近鄰回歸 預測波士頓房價

python3 學習機器學習api 使用兩種k近鄰回歸模型 分別是 平均k近鄰回歸 和 距離加權k近鄰回歸 進行預測 git: https://github.com/linyi0604/MachineLearning 代碼: 1 from sklearn.datasets import load_boston2 from sklearn.cross_validation import train_test_…

大話數據結構 (程杰 著)

1轉載于:https://www.cnblogs.com/revoid/p/9605734.html

wxpython實現界面跳轉

wxPython實現Frame之間的跳轉/更新的一種方法 wxPython是Python中重要的GUI框架,下面通過自己的方法實現模擬類似PC版微信登錄,并跳轉到主界面(朋友圈)的流程。 (一)項目目錄 【說明】 icon : 保存項目使用…

java職業技能了解精通_如何通過精通數字分析來提升職業生涯的發展,第8部分...

java職業技能了解精通Continuing from the seventh article in this series, we are going to explore ways to present data. Over the past few years, Marketing and SEO field has become more data-driven than in the past thanks to tools like Google Webmaster Tools …

2028. 找出缺失的觀測數據

2028. 找出缺失的觀測數據 現有一份 n m 次投擲單個 六面 骰子的觀測數據,骰子的每個面從 1 到 6 編號。觀測數據中缺失了 n 份,你手上只拿到剩余 m 次投擲的數據。幸好你有之前計算過的這 n m 次投擲數據的 平均值 。 給你一個長度為 m 的整數數組 …

51nod 1250 排列與交換——dp

題目:http://www.51nod.com/onlineJudge/questionCode.html#!problemId1250 仔細思考dp。 第一問,考慮已知 i-1 個數有多少種方案。再放入一個數,它是最大的且在最后面,所以它的位置不同的話,就是不同的方案。它在特定…

BZOJ.1024.[SCOI2009]生日快樂(記憶化搜索)

題目鏈接 搜索,枚舉切的n-1刀。 對于長n寬m要切x刀,可以劃分為若干個 長n寬m要切x刀 的子問題,對所有子問題的答案取max 對所有子問題的方案取min 就是當前狀態答案。 這顯然是會有很多重復狀態的,用map記憶化(長寬都是double)。 …

kfc流程管理炸薯條幾秒_炸薯條成為數據科學的最后前沿

kfc流程管理炸薯條幾秒In February, our Data Science team had an argument about which restaurant we went to made the best French Fry.2月,我們的數據科學團隊對我們去哪家餐廳做得最好的炸薯條產生了爭議。 We decided to make it a competition throughout…

XSS理解與防御

一、說明 我說我不理解為什么別人做得出來我做不出來,比如這里要說的XSS我覺得很多人就不了解其定義和原理的,在不了解定義和原理的背景下他們可以拿站,這讓人怎么理解呢。那時我最怕兩個問題,第一個是題目做得怎么樣第二個是你能…

Java大數

轉自:https://www.cnblogs.com/zufezzt/p/4794271.html import java.util.*; import java.math.*; public class Main{public static void main(String args[]){Scanner cin new Scanner(System.in);BigInteger a, b;//以文件EOF結束while (cin.hasNext()){a cin.…

2027. 轉換字符串的最少操作次數

2027. 轉換字符串的最少操作次數 給你一個字符串 s ,由 n 個字符組成,每個字符不是 ‘X’ 就是 ‘O’ 。 一次 操作 定義為從 s 中選出 三個連續字符 并將選中的每個字符都轉換為 ‘O’ 。注意,如果字符已經是 ‘O’ ,只需要保持…

bigquery_到Google bigquery的sql查詢模板,它將您的報告提升到另一個層次

bigqueryIn this post, we’re sharing report templates that you can build with SQL queries to Google BigQuery data.在本文中,我們將分享您可以使用SQL查詢為Google BigQuery數據構建的報告模板。 First, you’ll find out about what you can calculate wit…

分類樹/裝袋法/隨機森林算法的R語言實現

原文首發于簡書于[2018.06.12] 本文是我自己動手用R語言寫的實現分類樹的代碼,以及在此基礎上寫的袋裝法(bagging)和隨機森林(random forest)的算法實現。全文的結構是: 分類樹 基本知識predginisplitrules…

數據科學學習心得_學習數據科學時如何保持動力

數據科學學習心得When trying to learn anything all by yourself, it is easy to lose motivation and get thrown off track.嘗試自己學習所有東西時,很容易失去動力并偏離軌道。 In this article, I will provide you with some tips that I used to stay focus…

用php當作cat使用

今天,本來是想敲 node test.js 執行一下,test.js文件,結果 慣性的敲成了 php test.js, 原文輸出了 test.js的內容。 突然覺得,這東西 感覺好像是 cat 命令,嘿嘿,以后要是ubuntu 上沒裝 cat , …

建信01. 間隔刪除鏈表結點

建信01. 間隔刪除鏈表結點 給你一個鏈表的頭結點 head,每隔一個結點刪除另一個結點(要求保留頭結點)。 請返回最終鏈表的頭結點。 示例 1: 輸入:head [1,2,3,4] 輸出: [1,3] 解釋: 藍色結點為刪除的結點…

python安裝Crypto:NomodulenamedCrypto.Cipher

python 安裝Crypto時出現的錯誤:NomodulenamedCrypto.Cipher 首先直接pip install Crypto 這時會在lib/site-packages/ 文件夾下生成crypto文件夾,將其重命名為Crypto ...然而這個文件夾下沒有Cipher模塊,還需要pip安裝一個pycrypto,不過wind…

python多項式回歸_在python中實現多項式回歸

python多項式回歸Video Link影片連結 You can view the code used in this Episode here: SampleCode您可以在此處查看 此劇 集中使用的代碼: SampleCode 導入我們的數據 (Importing our Data) The first step is to import our data into python.第一步是將我們的…

Uboot 命令是如何被使用的?

有什么問題請 發郵件至syyxyoutlook.com, 歡迎交流~ 在uboot代碼中命令的模式是這個樣子: 這樣是如何和命令行交互的呢? 在command.h 中, 我們可以看到如下宏定義 將其拆分出來: #define U_BOOT_CMD(name,maxargs,rep,cmd,usage,help) \ U_…