我正在尝试使用 Cloud Data Fusion 进行一些测试,但是,在运行管道时遇到连接问题。我了解到它正在使用默认网络,并且我想将我的系统计算配置文件更改为不同的网络。
问题是,我没有创建新系统计算配置文件的选项(该选项不会显示在“配置”选项卡下)。我如何才能获得正确的访问权限来创建新的计算配置文件?我的角色是数据融合管理员。
谢谢。
我正在尝试将两个时间戳之间的分钟差异转换为MM/dd/yyyy hh:mm:ss AM/PM. 我刚开始使用 SparkSQL 并尝试使用datediff其他 SQL 语法支持的基本函数 Ie datediff(minute,start_time,end_time),但这产生了错误:
org.apache.spark.sql.AnalysisException: cannot resolve '`minute`' given input columns: [taxisub.tpep_dropoff_datetime, taxisub.DOLocationID, taxisub.improvement_surcharge, taxisub.VendorID, taxisub.trip_distance, taxisub.tip_amount, taxisub.tolls_amount, taxisub.payment_type, taxisub.fare_amount, taxisub.tpep_pickup_datetime, taxisub.total_amount, taxisub.store_and_fwd_flag, taxisub.extra, taxisub.passenger_count, taxisub.PULocationID, taxisub.mta_tax, taxisub.RatecodeID]; line 1 pos 153;
Run Code Online (Sandbox Code Playgroud)
似乎minutesparkSQL 的 datediff 不支持该参数。我目前的查询是:
spark.sqlContext.sql("Select to_timestamp(tpep_pickup_datetime,'MM/dd/yyyy hh:mm:ss') as pickup,to_timestamp(tpep_dropoff_datetime,'MM/dd/yyyy hh:mm:ss') as dropoff, datediff(to_timestamp(tpep_pickup_datetime,'MM/dd/yyyy hh:mm:ss'),to_timestamp(tpep_dropoff_datetime,'MM/dd/yyyy hh:mm:ss')) as diff from taxisub ").show()
Run Code Online (Sandbox Code Playgroud)
我的结果是:
+-------------------+-------------------+----+
| pickup| dropoff|diff|
+-------------------+-------------------+----+
|2018-12-15 08:53:20|2018-12-15 08:57:57| 0|
|2018-12-15 08:03:08|2018-12-15 08:07:30| 0|
|2018-12-15 …Run Code Online (Sandbox Code Playgroud)