# Connect to Databricks

\
To connect Databricks to the Finout platform, refer to the original Databricks guide for exporting billable usage in a CSV format: <https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html>

Create an S3 bucket that is continuously updated with Databricks usage reports.\
\
What you will do for the Databricks configuration:

## Grant Finout Access To Your Bucket <a href="#h_4b625f1382" id="h_4b625f1382"></a>

After creating the bucket, you need to grant Finout access to your bucket by creating an IAM role.

1. Copy your `“external-id”` from the Finout console, or use a random one, preferably in the format of `finout-XXXXXXX`
2. Click [creating a new cross-account role in IAM](https://console.aws.amazon.com/iam/home?region=us-east-1#/roles%24new?step=type\&roleType=crossAccount) to create a role for Another AWS account.<br>

   <figure><img src="/files/NTFAg8ND2oAKnOrVlU8o" alt=""><figcaption></figcaption></figure>
3. In the Account ID field, enter: `277411487094`.
4. Select the **Require external ID** option, and enter the `“external-id”` you got from the previous section.

   <figure><img src="https://finout.intercom-attachments.eu/i/o/6277292/88b5df2ba901d3d1ef2d6ec8/LWKGPt8xBgtenlC9_v8LGtGW5mo1IuIEtykF2QBdJELC-1XFq-tEdTDPDsdaNe_QPf4Pg--yWf43GW-f78yF4_GMIn_SSTZnKoFk4as9MQyU_kcEZSrVnV4a83AhuEFffdh796v4SVRjfPOJ__wTUNY?expires=1725883200&#x26;signature=4768c1d28d207666d5289ba03e7147d8f891042557ad7ed216b5dcfc29886823&#x26;req=1tdowlrzrnsp2RPy89ospx%2FPo3fGvAaTd0SEeVpm6dyv9edTLlR5lKLRl%2FI4%0A1FK1SJ3cCggHfRnHOdXSxDY%3D%0A" alt=""><figcaption></figcaption></figure>
5. Click **Next** until the review screen is displayed. Then configure it as shown below and click Next.

   <figure><img src="/files/IuzQcJIkrmb4kY0q0gKU" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://finout.intercom-attachments.eu/i/o/6277293/cea439b050c79bc52f42ec79/xkqrXmwmLY4urq6mKxHYGLWqCZYlEviTBgaeUitW0dzRg7Ac6OZDtcKXnfFx74z38RQJ16T-sPAr32JDTZjn9vZW6q0sua0SoGsomF9g8oYjMAxGGN5IGP9gANHZ8Odynuz_oLCyLmbOxRXbHnDbw6s?expires=1725883200&#x26;signature=6f173cc11879f30cd483740f4615d02d4f83bf5b51c05b7c2afdf4f79304ccbe&#x26;req=1tdowlrzr3sp2RPy89ospyKHozVYuuFvnMu3GFa2ZytAbPVLULNdbRiM9Ioj%0AgDwGopkZfbdbtjzynDfkEcY%3D%0A" alt=""><figcaption></figcaption></figure>
6. Go to your newly created role.

   <figure><img src="https://finout.intercom-attachments.eu/i/o/6277294/c0170cef9547e38051b2879c/_TNjhJS7MbtvEZ8A3vFci0cfb1t4xY3ZMSH9zFYYHaDAQ68gaCi8vzAI6Gio7BnrzWAY9Qg863Yumd92Y8z2J_MLzioNYRYV_pHqJLMTSDSrbgR4biEq-B4zAtEonqKuuuxnJ6O8g0MTjiHaFYU55J4?expires=1725883200&#x26;signature=59ab74f1f3880b17bca2260faeae0f58e364f823961902ecb7032b2e9d7e09f7&#x26;req=1tdowlrzqHsp2RPy89ospwgvFuMX27EexeNtuK7Q3LaS1NY4WXcaLliSheks%0ANzDnJf5KEKdrKRiSKuNHHPo%3D%0A" alt=""><figcaption></figcaption></figure>
7. Copy the `Role ARN` and paste it into the Finout console.
8. Click **Add permissions** and select **Create inline policy**.
9. Select JSON, and paste this inside - *While changing \<BUCKET\_NAME> with the bucket you create in the first section (or your existing CUR bucket, if you already have AWS as a Cost Center in Finout)*

```json
{
   "Version": "2012-10-17",
   "Statement": [
       {
           "Effect": "Allow",
           "Action": [
               "s3:Get*",
               "s3:List*"
           ],
           "Resource": "arn:aws:s3:::<BUCKET_NAME>/*"
       },
       {
           "Effect": "Allow",
           "Action": [
               "s3:Get*",
               "s3:List*"
           ],
           "Resource": "arn:aws:s3:::<BUCKET_NAME>"
       }
   ]
}
```

10. Click **Next** until the review screen is displayed, then name it `finout-access-policy`.
11. Click on **Create policy** to have your policy created for the IAM role.
12. Send Finout the following details:
    1. The newly created role
    2. The external ID
    3. Bucket name
    4. Path in the bucket
    5. Region
13. Provide Finout with the cost per DBU for each Databricks service.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.finout.io/billing-integrations/data-and-engineering-platforms/connect-to-databricks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
