```CREATE DATABASE IF NOT EXISTS dbt_chaim LOCATIO...
# help
u
Copy code
CREATE DATABASE IF NOT EXISTS dbt_chaim LOCATION '<s3a://dbt-chaim/main>';
u
Hey @Chaim Turkel. When you create the database, Hive metastore validates there is access to the
LOCATION
, for that to work you need to give Hive metastore access to your repo. This is how it should look in your
hive-site.xml
:
Copy code
<property>
        <name>fs.s3a.bucket.dbt-chaim.secret.key</name>
        <value>wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY</value>
    </property>
    <property>
        <name>fs.s3a.bucket.dbt-chaim.endpoint</name>
        <value><http://lakefs:8000></value>
    </property>
    <property>
        <name>fs.s3a.bucket.dbt-chaim.access.key</name>
        <value>AKIAIOSFODNN7EXAMPLE</value>
    </property>
u
does it have to be per repo? is there a way to configure it for all repos? we plan on having a repo per person 😞
u
It could be for all, but then you Hive metastore wont have access to AWS S3.
u
That would be:
Copy code
<property>
        <name>fs.s3a.secret.key</name>
        <value>wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY</value>
    </property>
    <property>
        <name>fs.s3a.endpoint</name>
        <value><http://lakefs:8000></value>
    </property>
    <property>
        <name>fs.s3a.access.key</name>
        <value>AKIAIOSFODNN7EXAMPLE</value>
    </property>
u
how do most people orginize the repos?
u
There are a couple of use cases: • Some have a Hive metastore dedicated for lakeFS • Some Use per repo configuration ( like in the example) • Some use Glue metastore where there is no validation
u
You could also configure lakeFS to be the default endpoint, and then configure the S3 endpoint per bucket (this would make sense if you have a small amount of buckets compare to repos).