Property/Variable Type Discovery

You may need to find the type of property or variable you are working with to determine the functions you can execute against it, or to make sure comparisons are with equivalent types of data. This code is meant to be executed in the scratchpad.

Input:

props['p.myProperty1']=true props['p.myProperty2']='12345' props['p.myProperty3']=12345

Code to run in Scratch pad:

props['p.myProperty1'].getClass().getName() 
props['p.myProperty2'].getClass().getName() 
props['p.myProperty3'].getClass().getName()

Results:

image.png
image.png

image.png
最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容

  • pyspark.sql模塊 模塊上下文 Spark SQL和DataFrames的重要類: pyspark.sql...
    mpro閱讀 9,504評論 0 13
  • By clicking to agree to this Schedule 2, which is hereby ...
    qaz0622閱讀 1,477評論 0 2
  • 顯示系統運行級別 runlevelN 5 切換級別: init 0 關機init 3 字符界面init 5 多用戶...
    玩阿軻睡妲己閱讀 458評論 0 0
  • 大咖的書有時也能忽悠人。 未來學家奈斯比特的新書《定見未來》,看了半天,才發現是個舊瓶裝新酒的貨。難怪很多的案例都...
    三福弗朗西斯閱讀 417評論 0 0
  • 偶然 你打窗外飄過 迷了我的眼 掠走我的心
    望望雪炳閱讀 204評論 0 0