liangjw opened a new issue, #23671:
URL: https://github.com/apache/doris/issues/23671

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Version
   
   1.2.6
   
   ### What's Wrong?
   
   I want to connect iceberg datasource via Create catalog command:
   `
   CREATE CATALOG iceberg PROPERTIES (
       "type"="iceberg",
       "iceberg.catalog.type"="rest",
       "uri" = "http://ip:host";,
       "AWS_ACCESS_KEY" = "ak"
       "AWS_SECRET_KEY" = "sk"
       "AWS_REGION" = "region-name"
       "AWS_ENDPOINT" = "http://endpoint-uri"; -- we use minIO ip&port uri format
   }
   `
   When I query data by "select * from iceberg.db.table" , doris raises a error 
like:
   
   detailMessage = Unexpected exception: Unable to load region from any of the 
providers in the chain 
software.amazon.awssdk.regions.providers.DefaultAwsRegionProviderChain@24c900d5:
 
[software.amazon.awssdk.regions.providers.SystemSettingsRegionProvider@fcf050d: 
Unable to load region from system settings. Region must be specified either via 
environment variable (AWS_REGION) or  system property (aws.region)., 
software.amazon.awssdk.regions.providers.AwsProfileRegionProvider@45180029: No 
region provided in profile: default, 
software.amazon.awssdk.regions.providers.InstanceProfileRegionProvider@683ba00c:
 Unable to retrieve region information from EC2 Metadata service. Please make 
sure the application is running on EC2.]
   
   I check the doris source and found that s3 properties not work:
   
   `Doris    
   @Override
       protected void initLocalObjectsImpl() {
           icebergCatalogType = ICEBERG_REST;
           Map<String, String> restProperties = new HashMap<>();
           String restUri = 
catalogProperty.getProperties().getOrDefault(CatalogProperties.URI, "");
           restProperties.put(CatalogProperties.URI, restUri);
           RESTCatalog restCatalog = new RESTCatalog();
           Configuration conf = replaceS3Properties(getConfiguration());
           restCatalog.setConf(conf);
           restCatalog.initialize(icebergCatalogType, restProperties);
           catalog = restCatalog;
       }
   `
    In Iceberg's source, RESTCatalog does not use 'Configuration' to build an 
S3File when performing a data query; it only uses restProperties. 
   
   
   
   
   
   ### What You Expected?
   
   Accurately query Iceberg data stored in S3
   
   ### How to Reproduce?
   
   _No response_
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to