-
Notifications
You must be signed in to change notification settings - Fork 362
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e6d2f3a
commit b35911f
Showing
6 changed files
with
117 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Glue Exporter | ||
on: | ||
post-commit: | ||
branches: ["{{ .Branch }}*"] | ||
hooks: | ||
- id: glue_exporter | ||
type: lua | ||
properties: | ||
script_path: "{{ .GlueScriptPath }}" | ||
args: | ||
aws: | ||
aws_access_key_id: "{{ .AccessKeyId }}" | ||
aws_secret_access_key: "{{ .SecretAccessKey }}" | ||
aws_region: "{{ .Region }}" | ||
table_source: '{{ .TableDescriptorPath }}' | ||
catalog: | ||
db_name: "{{ .GlueDB }}" | ||
table_input: | ||
StorageDescriptor: | ||
InputFormat: "org.apache.hadoop.hive.ql.io.SymlinkTextInputFormat" | ||
OutputFormat: "org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat" | ||
SerdeInfo: | ||
SerializationLibrary: "org.apache.hadoop.hive.serde2.OpenCSVSerde" | ||
Parameters: | ||
separatorChar: "," | ||
Parameters: | ||
classification: "csv" | ||
"skip.header.line.count": "1" |
15 changes: 15 additions & 0 deletions
15
esti/export_hooks_files/_lakefs_actions/symlink_export.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Symlink S3 Exporter | ||
on: | ||
post-commit: | ||
branches: ["{{ .Branch }}*"] | ||
hooks: | ||
- id: symlink_exporter | ||
type: lua | ||
properties: | ||
script_path: "{{ .SymlinkScriptPath }}" | ||
args: | ||
aws: | ||
aws_access_key_id: "{{ .AccessKeyId }}" | ||
aws_secret_access_key: "{{ .SecretAccessKey }}" | ||
aws_region: "{{ .Region }}" | ||
table_source: '{{ .TableDescriptorPath }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
local aws = require("aws") | ||
local exporter = require("lakefs/catalogexport/glue_exporter") | ||
action.commit_id = "{{ .OverrideCommitID }}" -- override commit id to use specific symlink file previously created | ||
local glue = aws.glue_client(args.aws.aws_access_key_id, args.aws.aws_secret_access_key, args.aws.aws_region) | ||
exporter.export_glue(glue, args.catalog.db_name, args.table_source, args.catalog.table_input, action, {debug=true}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
local exporter = require("lakefs/catalogexport/symlink_exporter") | ||
local aws = require("aws") | ||
local table_path = args.table_source | ||
local s3 = aws.s3_client(args.aws.aws_access_key_id, args.aws.aws_secret_access_key, args.aws.aws_region) | ||
exporter.export_s3(s3, table_path, action, {debug=true}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters