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,554评论 0 13
  • By clicking to agree to this Schedule 2, which is hereby ...
    qaz0622阅读 1,530评论 0 2
  • 显示系统运行级别 runlevelN 5 切换级别: init 0 关机init 3 字符界面init 5 多用户...
    玩阿轲睡妲己阅读 461评论 0 0
  • 大咖的书有时也能忽悠人。 未来学家奈斯比特的新书《定见未来》,看了半天,才发现是个旧瓶装新酒的货。难怪很多的案例都...
    三福弗朗西斯阅读 419评论 0 0
  • 偶然 你打窗外飘过 迷了我的眼 掠走我的心
    望望雪炳阅读 209评论 0 0