小编Cam*_*ron的帖子

在 AWS Glue 中转换其他列的数据类型时,某些列会变为 null

我正在尝试使用 AWS Glue 将 csv 数据从 AWS S3 移动到 AWS Redshift。我正在移动的数据使用非标准格式来记录每个条目的时间戳(例如 01-JAN-2020 01.02.03),因此我的胶水爬行程序将此列作为字符串拾取。

在我的作业脚本中,我使用 pyspark 中的“to_timestamp”函数将此列转换为时间戳,该函数似乎工作正常。但是,因此,数据类型为“long”的列不会传输到 redshift,并且这些列的值全部为空。

当我运行脚本而不转换时间戳列(即仅生成的脚本)时,数据类型“long”的列没有出现此问题,并且它们正确显示在红移中。

这是我的代码:

import sys
from awsglue.transforms import *
from awsglue.utils import getResolvedOptions
from pyspark.context import SparkContext
from awsglue.context import GlueContext
from awsglue.job import Job
from awsglue.dynamicframe import DynamicFrame
from pyspark.sql.functions import to_timestamp, col

## @params: [TempDir, JOB_NAME]
args = getResolvedOptions(sys.argv, ['TempDir','JOB_NAME'])

sc = SparkContext()
glueContext = GlueContext(sc)
spark = glueContext.spark_session
job = Job(glueContext)
job.init(args['JOB_NAME'], args)
## @type: DataSource
## @args: [database = "telenors3csvdata", …
Run Code Online (Sandbox Code Playgroud)

amazon-web-services apache-spark pyspark aws-glue

5
推荐指数
1
解决办法
1万
查看次数

Windows 进程激活服务 (WAS) 无法启动

IIS 10 不会在我的 PC 上重新启动。当我导航到本地主机时,我收到“本地主机拒绝连接”消息。查看事件查看器后,发现问题在于 Windows Process Activation Service (WAS) 无法启动。

给出的错误信息是:

'The Windows Process Activation Service (WAS) encountered an error while handling key generation. This will prevent WAS from starting corrently. The data field contains the error number.'
Run Code Online (Sandbox Code Playgroud)

当我尝试从服务应用程序手动启动服务时,我得到以下信息:

WAS 错误

有没有人遇到过这个问题?任何帮助将不胜感激,我已经在互联网上搜索了几天试图找到无济于事的解决方案。

windows iis was

3
推荐指数
2
解决办法
2345
查看次数