oracle-samples / usage-reports-to-adw

Usage2adw is a tool which uses the Python SDK to extract the usage and cost reports from your tenant and load it to Oracle Autonomous Database. (DbaaS can be used as well) Authentication to OCI by User or instance principals.
Other
13 stars 9 forks source link

currency code is different cost file downloaded vs uploaded data #11

Closed edwjack closed 1 year ago

edwjack commented 1 year ago

Good Day!

This subscription was initiated by Oracle Malaysia. Although I lack the complete history of changes, the cost report exclusively displays Cost details (USD). Furthermore, the Cost analysis in the OCI Console is also presented in USD, even the older cost files, like those from JAN/2023, exhibit the USD currency.

uploaded data

query : select distinct cost_currency_code from oci_cost
result : MYR

Could you please guide me on where to conduct further checks?

Thanks,

adizohar commented 1 year ago

Hi, usage2adw does not change the currencycode, if you find MYR in oci_cost, it means the cost file has MYR usage2adw supports only one currencycode, not mixed

in order to check further, I would suggest you to check the files using oci cli

# list of oci cost files:
oci os object list -ns bling -bn $tenant_ocid --auth instance_principal --all --output table --prefix reports/cost

# download one file
oci os object get --name reports/cost-csv/$file.csv.gz -bn $tenant_ocid --file file.gz --auth instance_principal -ns bling
edwjack commented 1 year ago

Hello, I've conducted the check. The cost file downloaded from the console (USD) and the one downloaded from the CLI (MYR) have different naming conventions and present varying current costs. I'll work to resolve this matter on my end. Thanks,