How Can I See the Monthly Costs Accrued for Each Connector?
Question
How can I see a list of the monthly costs accrued for each connector?
Environment
All connectors
Answer
You can see a list of the costs accrued for all connectors in any given month by querying the data provided by the Fivetran Platform Connector. Use the following query in your destination, replacing yyyy
and mm
with the applicable year and month value.
Select schema_name,destination_id,MAR,measured_month,Total_month_MAR,MAR_PERCENTAGE,(select sum(amount)
from FIVETRAN_LOG.USAGE_COST where MEASURED_MONTH='yyyy-mm') as Total_cost,(MAR_PERCENTAGE*(select sum(amount)
from FIVETRAN_LOG.USAGE_COST where MEASURED_MONTH='yyyy-mm')/100) as COST_for_connector from (
select schema_name,destination_id,MAR,measured_month,Total_month_MAR,(MAR/Total_month_MAR*100)as MAR_PERCENTAGE, from (
select schema_name,destination_id,MAR,measured_month,
(select sum(MAR) as Total_month_MAR from
(Select schema_name,destination_id,MAR,measured_month from
(select schema_name,
destination_id,
date_trunc('month', measured_date) as measured_month,
sum(incremental_rows) as MAR
from FIVETRAN_LOG.incremental_mar
where free_type = 'PAID'
group by schema_name, destination_id, measured_month
order by measured_month, schema_name) where measured_month='yyyy-mm-01')) as Total_month_MAR
from
(Select schema_name,destination_id,MAR,measured_month from
(select schema_name,
destination_id,
date_trunc('month', measured_date) as measured_month,
sum(incremental_rows) as MAR
from FIVETRAN_LOG.incremental_mar
where free_type = 'PAID'
group by schema_name, destination_id, measured_month>
order by measured_month, schema_name) where measured_month='yyyy-mm-01')));