Commit bc68a743 authored by 张彦钊's avatar 张彦钊

修改test文件

parent 897d0d68
......@@ -26,10 +26,10 @@ def test():
# spark.sql("CREATE TEMPORARY FUNCTION is_json AS 'com.gmei.hive.common.udf.UDFJsonFormatCheck'")
spark.sparkContext.setLogLevel("WARN")
ti = pti.TiContext(spark)
ti.tidbMapDatabase("jerry_test")
# ti = pti.TiContext(spark)
# ti.tidbMapDatabase("jerry_test")
df = spark.sql("select max(stat_date) from esmm_train_data")
df = spark.sql("select max(stat_date) from jerry_test.esmm_train_data")
df.show()
t = df.rdd.map(lambda x: str(x[0])).collect()
print(t.count())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment