Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!

S3EnableVirtualAddressing setting is not working

I am using localstack to mock s3 and running a COPY from mocked S3 localstack as below

ALTER SESSION SET AWSAuth='test:test';
ALTER SESSION SET AWSRegion='us-east-1';
ALTER SESSION SET AWSEndpoint='localhost:4566';
ALTER SESSION SET S3EnableVirtualAddressing=1;

COPY test.test(start,advertiser) FROM 's3://reports/*.csv' ON ANY NODE PARSER FCSVParser(type='traditional', reject_on_materialized_type_error='true', header='false', delimiter=E'\t') TRAILING NULLCOLS ABORT ON ERROR NO COMMIT;

this copy is failing with error 'Cannot expand glob pattern due to error, unable to connect to endpoint'

The debug log shows
CurlHttpClient [140639308084992] Making request to http://reports.localhost:4566?encoding-type=url&list-type=2&prefix=saf_fact_kvp_emr/fact_exchange_wins/

instead of request
http://localhost:4566/reports?encoding-type=url&list-type=2&prefix=saf_fact_kvp_emr/fact_exchange_wins/

can someone help me understand the issue and how to fix it?

Answers

  • Bryan_HBryan_H Administrator

    S3EnableVirtualAddressing rewrites URL to include bucket name as part of the host name so it is not required in this configuration. Please try again with S3EnableVirtualAddressing=0 to connect to endpoint in the form http://host:port/bucketname

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file

Can't find what you're looking for? Search the Vertica Documentation, Knowledge Base, or Blog for more information.