Automate

Analyse Costfluent cost in your BI tool or warehouse

Choose how Costfluent cost reaches the tools your analysts use, from a one-off CSV or Excel export to Power BI, a daily FOCUS 1.4 feed into your bucket, warehouse SQL and the SDKs.

By the end of this guide, Costfluent's cost data reaches the tool your analysts already work in: a spreadsheet, Power BI or Excel, your own data warehouse, or a script. It is for finance and for the data engineers who keep the company's reporting in one place. The path starts with choosing by need, then follows the steps of the path you chose; you rarely need more than one or two. Each step links to the page that owns the detail.

Before you start

  • A connection whose first collection has finished; see Quickstart.
  • Each path needs its own right: exporting a report, creating an API token, or adding a bucket destination. Each step's page names it under its Before you start; see Access model.
  • Steps 2, 3 and 6 work on the sample data a new organization starts with. No bucket export is sent from it, so steps 4 and 5 need a real connection.

1. Choose by need

You needPathStep
One report's numbers in a spreadsheet, onceExport to CSV or Excel2
A table in Power BI Desktop or Excel that you refreshPower BI and Excel3
Every day's cost rows, as FOCUS 1.4 files in a bucket you own, for a warehouse or a data lakeBucket export4
A saved report's numbers, computed in your warehouseCopy SQL over the bucket export5
Cost data in your own code or pipelineSDKs6

The export and the Power Query read what Costfluent counts, in the workspace's currency settings. The bucket export carries the bill's rows in their billing currency, with no conversion, so its totals can differ from a report that converts.

2. Export a report as CSV or Excel

Set up the report as you want it, open Export above the cost table, and choose CSV or Excel under Costfluent columns for Costfluent's native columns, or under FOCUS 1.4 (FinOps standard) for FOCUS column names. Choose the CSV when the figures must reconcile to the last digit, and Excel in a spreadsheet set to German, which misreads the CSV's separators. See Export to CSV or Excel.

3. Load cost into Power BI or Excel

Create a token for the workspace from the Read only preset with only View costs, as Create a token describes. Paste the page's query into a blank query in Power BI Desktop or Excel, connect to the API as an anonymous source, and load it; Refresh reads the latest cost again. The token is stored in the file in plain text, so keep the file where only the people allowed to see the cost can open it, and use a service token for a report your team shares, so it keeps refreshing after you leave. See Power BI and Excel.

4. Deliver the cost rows to your bucket

Grant the export its one write permission, scoped to its folder in your bucket, as Grant write access shows for each storage. Then open Settings, then Workspaces, select the workspace, and on the Bucket export card select Add destination. For a warehouse, choose Parquet under File format and turn on Warehouse table, so the folder also holds a Delta Lake table that always names the newest version of every day. Then select Connect a warehouse on the destination's row, choose your engine, and run the statement it shows, filled with your bucket, as Warehouse table describes for each engine. See Bucket export.

5. Write a saved report's query for your warehouse

Save the report, open Export above the cost table, and choose Copy SQL. Choose the Warehouse your table lives in and copy the query. It reads focus_costs, the name the statement of step 4 gives the table, so it runs as it is; in BigQuery, qualify it with your dataset. See Copy SQL on the warehouse table page. A report using something the export does not carry, such as a segment, gets no query, and the dialog says why. See Copy SQL.

6. Read cost from your own code

Use the Go, Python or TypeScript client for the Public API, with a token scoped to the workspace and the capabilities your script calls. The clients follow every page, retry what is safe to retry and keep amounts exact; read cost data from one state, so a sync that lands while you page cannot repeat or skip a row. See SDKs, Read cost data from one state and the API reference.

Check the result

  • The exported file holds the groups the report shows, under the column set you chose.
  • After Refresh, the Power BI or Excel table shows the current month's cost so far.
  • The bucket destination's row shows the day it is delivered through, and with Warehouse table on, its last commit.
  • The query from Copy SQL runs in your warehouse against the registered table and returns the report's groups.

Keep it true

Costfluent recommends checking the bucket destination's row whenever you review cost, since a destination that is behind or failing says so there. Replace a Power Query's or a script's token before its expiration, and revoke it under API tokens when someone who had the file leaves.

From your assistant

With the Costfluent MCP server connected, your assistant answers these with list_cost_reports and get_cost_report_sql.

Code
Write the BigQuery SQL behind our saved report "Monthly cost by service" over the bucket export's columns, and tell me which table name to replace.
Code
Which settings of our saved report "Team showback" can the bucket export not express in Snowflake SQL, and why?