<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Databricks not able to create table in minio bucket in Machine Learning</title>
    <link>https://community.databricks.com/t5/machine-learning/databricks-not-able-to-create-table-in-minio-bucket/m-p/10804#M541</link>
    <description>&lt;P&gt;MANAGED LOCATION is for Unity Catalog. Please check if you are under the unity catalog, not under hive metastore. Additionally, with Unity, you are not using sc._jsc.hadoopConfiguration() etc. but just register storage credentials and external location in metastore first.&lt;/P&gt;</description>
    <pubDate>Tue, 24 Jan 2023 18:45:16 GMT</pubDate>
    <dc:creator>Hubert-Dudek</dc:creator>
    <dc:date>2023-01-24T18:45:16Z</dc:date>
    <item>
      <title>Databricks not able to create table in minio bucket</title>
      <link>https://community.databricks.com/t5/machine-learning/databricks-not-able-to-create-table-in-minio-bucket/m-p/10797#M534</link>
      <description>&lt;P&gt;Trying to create table in minio bucket using databricks.&lt;/P&gt;&lt;P&gt;&lt;B&gt;spark.sql("create database if not exists minio_db_1 managed location 's3a://my-bucket/minio_db_1'");&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am passing the s3 configurations using spark context.&lt;/P&gt;&lt;P&gt;access_key = 'XXXX'&lt;/P&gt;&lt;P&gt;secret_key = 'XXXXXXX'&lt;/P&gt;&lt;P&gt;&lt;B&gt;sc._jsc.hadoopConfiguration().set("fs.s3a.access.key", access_key)&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;sc._jsc.hadoopConfiguration().set("fs.s3a.secret.key", secret_key)&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;sc._jsc.hadoopConfiguration().set("fs.s3a.endpoint", "&lt;/B&gt;&lt;A href="http://my-ip:9000/" alt="http://my-ip:9000/" target="_blank"&gt;&lt;B&gt;&lt;/B&gt;&lt;/A&gt;&lt;A href="http://my-ip:9000" target="test_blank"&gt;http://my-ip:9000&lt;/A&gt;&lt;B&gt;")&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With this config I am able to write data in s3 using&lt;/P&gt;&lt;P&gt;df.write.format("parquet").save("s3a://my-bucket/file-path");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it's throwing exception when I m trying to create table/database;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;spark.sql("create database if not exists minio_db_1 managed location 's3a://my-bucket/minio_db_1'");&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AnalysisException: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: java.nio.file.AccessDeniedException s3a://my-bucket/my-database: getFileStatus on s3a://test2/minio_db_1: com.amazonaws.services.s3.model.AmazonS3Exception: Forbidden; request: HEAD&amp;nbsp;&lt;A href="https://test2.s3.us-east-1.amazonaws.com/" alt="https://test2.s3.us-east-1.amazonaws.com/" target="_blank"&gt;&lt;B&gt;&lt;/B&gt;&lt;/A&gt;&lt;A href="https://test2.s3.us-east-1.amazonaws.com" target="test_blank"&gt;https://test2.s3.us-east-1.amazonaws.com&lt;/A&gt;&lt;B&gt;&amp;nbsp;&lt;/B&gt;minio_db_1 {} Hadoop 3.3.4, aws-sdk-java/1.12.189 Linux/5.4.0-1093-aws OpenJDK_64-Bit_Server_VM/25.345-b01 java/1.8.0_345 scala/2.12.14 vendor/Azul_Systems,_Inc. cfg/retry-mode/legacy com.amazonaws.services.s3.model.GetObjectMetadataRequest; Request ID: 6YBEAZY59EYGAEVB, Extended Request ID: o+h6YBGczQmWsnFMW8kLGi+llJ+v3ysqoz05fnNYTH901+ACgmi5x50dE2ekXbNrr3qQf81uOx8=, Cloud Provider: AWS, Instance ID: i-072d1969af3c17cb6 (Service: Amazon S3; Status Code: 403; Error Code: 403 Forbidden; Request ID: 6YBEAZY59EYGAEVB; S3 Extended Request ID: o+h6YBGczQmWsnFMW8kLGi+llJ+v3ysqoz05fnNYTH901+ACgmi5x50dE2ekXbNrr3qQf81uOx8=; Proxy: null), S3 Extended Request ID: o+h6YBGczQmWsnFMW8kLGi+llJ+v3ysqoz05fnNYTH901+ACgmi5x50dE2ekXbNrr3qQf81uOx8=:403 Forbidden)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;The request should routed to the s3a endpoint, but it's routing to the generic s3 endpoint. Somehow spar.sql not honouring the spark context configurations.&lt;/B&gt;&lt;/P&gt;&lt;P&gt;Can anyone please point out the configs lacking here for table creation?&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 05:02:09 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/databricks-not-able-to-create-table-in-minio-bucket/m-p/10797#M534</guid>
      <dc:creator>wasim_reza</dc:creator>
      <dc:date>2023-01-24T05:02:09Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks not able to create table in minio bucket</title>
      <link>https://community.databricks.com/t5/machine-learning/databricks-not-able-to-create-table-in-minio-bucket/m-p/10798#M535</link>
      <description>&lt;P&gt;Hi @Wasim Reza​ I think there are some permission issue while creating the database-&lt;/P&gt;&lt;P&gt;&lt;B&gt;(message:Got exception: java.nio.file.AccessDeniedException s3a://my-bucket/my-database: getFileStatus on s3a://test2/minio_db_1:)&lt;/B&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 05:34:36 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/databricks-not-able-to-create-table-in-minio-bucket/m-p/10798#M535</guid>
      <dc:creator>Ajay-Pandey</dc:creator>
      <dc:date>2023-01-24T05:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks not able to create table in minio bucket</title>
      <link>https://community.databricks.com/t5/machine-learning/databricks-not-able-to-create-table-in-minio-bucket/m-p/10800#M537</link>
      <description>&lt;P&gt;Hi @Wasim Reza​&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why is fs.s3a.endpoint pointing to &lt;A href="http://my-ip:9000" target="test_blank"&gt;http://my-ip:9000&lt;/A&gt;? Can you verify if this is the right aws endpoint?&lt;/P&gt;&lt;P&gt;Is there any instance profile attached to the cluster? access-secret keys along with instance profile can be confusing.&lt;/P&gt;&lt;P&gt;Verify the permissions on the AWS side.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 08:46:04 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/databricks-not-able-to-create-table-in-minio-bucket/m-p/10800#M537</guid>
      <dc:creator>Vivian_Wilfred</dc:creator>
      <dc:date>2023-01-24T08:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks not able to create table in minio bucket</title>
      <link>https://community.databricks.com/t5/machine-learning/databricks-not-able-to-create-table-in-minio-bucket/m-p/10801#M538</link>
      <description>&lt;P&gt;@Vivian Wilfred​&amp;nbsp;I am using Minio as a s3 provider, Minio apis are s3 compatable it only has different endpoint.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 09:30:31 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/databricks-not-able-to-create-table-in-minio-bucket/m-p/10801#M538</guid>
      <dc:creator>wasim_reza</dc:creator>
      <dc:date>2023-01-24T09:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks not able to create table in minio bucket</title>
      <link>https://community.databricks.com/t5/machine-learning/databricks-not-able-to-create-table-in-minio-bucket/m-p/10802#M539</link>
      <description>&lt;P&gt;@Wasim Reza​&amp;nbsp;Can you try setting it to s3.amazonaws.com or &lt;A href="https://s3.&amp;lt;region&amp;gt;.amazonaws.com" target="test_blank"&gt;https://s3.&amp;lt;region&amp;gt;.amazonaws.com&lt;/A&gt; ?&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 10:51:23 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/databricks-not-able-to-create-table-in-minio-bucket/m-p/10802#M539</guid>
      <dc:creator>Vivian_Wilfred</dc:creator>
      <dc:date>2023-01-24T10:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks not able to create table in minio bucket</title>
      <link>https://community.databricks.com/t5/machine-learning/databricks-not-able-to-create-table-in-minio-bucket/m-p/10803#M540</link>
      <description>&lt;P&gt;@Vivian Wilfred​&amp;nbsp;right now by default its pointing to the &amp;nbsp;&lt;A href="https://test2.s3.us-east-1.amazonaws.com/" alt="https://test2.s3.us-east-1.amazonaws.com/" target="_blank"&gt;&lt;B&gt;&lt;/B&gt;&lt;/A&gt;&lt;A href="https://test2.s3.us-east-1.amazonaws.com" target="test_blank"&gt;https://test2.s3.us-east-1.amazonaws.com&lt;/A&gt; [from the logs]. If we use s3.&amp;lt;region&amp;gt; it will not find the bucket as the bucket is in minio cluster not in the s3 region&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 11:46:08 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/databricks-not-able-to-create-table-in-minio-bucket/m-p/10803#M540</guid>
      <dc:creator>wasim_reza</dc:creator>
      <dc:date>2023-01-24T11:46:08Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks not able to create table in minio bucket</title>
      <link>https://community.databricks.com/t5/machine-learning/databricks-not-able-to-create-table-in-minio-bucket/m-p/10804#M541</link>
      <description>&lt;P&gt;MANAGED LOCATION is for Unity Catalog. Please check if you are under the unity catalog, not under hive metastore. Additionally, with Unity, you are not using sc._jsc.hadoopConfiguration() etc. but just register storage credentials and external location in metastore first.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 18:45:16 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/databricks-not-able-to-create-table-in-minio-bucket/m-p/10804#M541</guid>
      <dc:creator>Hubert-Dudek</dc:creator>
      <dc:date>2023-01-24T18:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks not able to create table in minio bucket</title>
      <link>https://community.databricks.com/t5/machine-learning/databricks-not-able-to-create-table-in-minio-bucket/m-p/10799#M536</link>
      <description>&lt;P&gt;Hi, what if , if you change s3a://&amp;lt;&amp;gt; to s3://&amp;lt;&amp;gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 07:15:06 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/databricks-not-able-to-create-table-in-minio-bucket/m-p/10799#M536</guid>
      <dc:creator>Debayan</dc:creator>
      <dc:date>2023-01-24T07:15:06Z</dc:date>
    </item>
  </channel>
</rss>

