Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getQueryResultsFromS3 function should be able to support subfolders #4

Closed
deliverymanager opened this issue Jan 28, 2019 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@deliverymanager
Copy link

If I declare

const athenaExpressConfig = {
  aws,
  s3: "s3://bucket-name/sub-directory/",
  db: process.env.athena_database,
  getStats: true
};

then this functions fails.
Consider replacing with the following:

function getQueryResultsFromS3(params) {
const bucket = params.config.s3Bucket.replace("s3://", "").split("/")[0];
	const s3Params = {
			Bucket: bucket,
			Key: params.s3Output.replace("s3://" + bucket + "/", "")
		}
@ghdna
Copy link
Owner

ghdna commented Jan 28, 2019

Just pushed 3.3.0 that supports sub folders. Good catch!

@ghdna ghdna self-assigned this Jan 28, 2019
@ghdna ghdna added the enhancement New feature or request label Jan 28, 2019
@ghdna ghdna closed this as completed Jan 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants