小编hgp*_*ana的帖子

尝试使用 AWS Glue 中的笔记本创建动态框架时出现错误“java.io.FileNotFoundException: No such file or directory”

我正在 AWS Glue 中设置一个新的 Jupyter Notebook 作为开发端点,以便测试一些用于运行 ETL 脚本的代码。到目前为止,我使用 AWS Glue 创建了一个基本的 ETL 脚本,但是由于某种原因,当我尝试在 Jupyter Notebook 上运行代码时,我不断收到FileNotFoundException.

我正在使用由 AWS Crawler 创建的表(在数据目录中)来获取与 S3 存储桶关联的信息,并且我能够实际获取存储桶内的文件名,但是当我尝试读取文件时使用动态框架,FileNotFoundException抛出an 。

以前有人遇到过这个问题吗?

这是在 N.Virginia AWS 账户上运行的。我已经设置了权限,向 AWS Glue 服务授予了 IAM 角色,设置了 VPC 端点并尝试直接在 AWS Glue 中运行作业,但无济于事。

这是基本代码:

datasource0 = glueContext.create_dynamic_frame.from_catalog(database = "xxx-database", table_name = "mytable_item", transformation_ctx = "datasource0")

datasource0.printSchema()
datasource0.show()
Run Code Online (Sandbox Code Playgroud)

或者:

datasource0 = glueContext.create_dynamic_frame.from_options('s3', connection_options={"paths":["s3://my-bucket/92387979/My-Table-Item/2016-09-11T16:30:00.000Z/"]}, format="json", transformation_ctx="")


datasource0.printSchema()
datasource0.show()
Run Code Online (Sandbox Code Playgroud)

我希望收到一个动态帧内容,但这实际上是在抛出这个错误:

An error occurred while calling o343.schema.
: org.apache.spark.SparkException: Job aborted due to stage …
Run Code Online (Sandbox Code Playgroud)

etl amazon-s3 pyspark aws-glue

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

NestJS + TypeORM 中的 JoinTable 问题

我在 NestJS + TypeORM 中遇到一个奇怪的问题。

我几乎已经在实体中创建了一个 ManyToMany 关系,并且在该关系的拥有方,我添加了不带参数的 @JoinTable() 。

运行 Nest build 后,entity.js 文件添加了一个新的 import const browser_1 = require("typeorm/browser");,我发现它用于在编译的 JS 文件 => 中声明 JoinTable 选项browser_1.JoinTable()

问题是,当使用 typeorm 生成新的迁移文件时,我不断收到以下错误:

import { __awaiter, __generator } from "tslib";
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at wrapSafe (internal/modules/cjs/loader.js:979:16)
    at Module._compile (internal/modules/cjs/loader.js:1027:27)
    at Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Object.require.extensions.<computed> [as .js] (C:\XXX\XXX\dev\XXX\pistis-api\node_modules\ts-node\src\index.ts:1045:43)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (C:\XXX\XXX\dev\XXX\pistis-api\dist\modules\collaborator\entity\collaborator.entity.js:17:19)
    at Module._compile (internal/modules/cjs/loader.js:1063:30) …
Run Code Online (Sandbox Code Playgroud)

typeorm ts-node nestjs

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

标签 统计

amazon-s3 ×1

aws-glue ×1

etl ×1

nestjs ×1

pyspark ×1

ts-node ×1

typeorm ×1