对于任何给定的(Postgres) SQL查询,我需要能够提取列名和列类型。我不需要查询的结果。我需要它的速度(也就是说,我不想等待查询本身完成--尤其是如果需要几分钟或更长的时间)。我以为我有一个解决方案:with X as ( from customers group by nationalityfrom custome
我在python中有一个pySpark数据帧- from pyspark.sql.functions import col
dataset = sqlContext.range(0, 100).select((col("id") % 3).alias("key")) 列名是key,我想使用变量选择此列。select $myvar from dataset ").show 但是它返回了一个错误 no viable alternative at input 'sele