Skip to content

Add currency unit to country table#25

Open
yukinko-iwasaki wants to merge 5 commits intomainfrom
enhance/add-currencyunit
Open

Add currency unit to country table#25
yukinko-iwasaki wants to merge 5 commits intomainfrom
enhance/add-currencyunit

Conversation

@yukinko-iwasaki
Copy link
Contributor

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds currency information to the country table by joining with an exchange rate reference table. The changes enable the country table to include currency name and currency code fields for each country.

Changes:

  • Modified admin1 boundaries to include ISO2 country codes
  • Added currency data from the corporate reference data catalog
  • Joined currency information with country data using ISO2 country codes

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
geo/admin_boundaries_dlt.py Added country_code_iso2 field to admin1_boundaries_gold table
country.py Added currency data join using ISO2 country codes and integrated currency fields into country table

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

yukinko-iwasaki and others added 2 commits February 24, 2026 13:53
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

# COMMAND ----------

from pyspark.sql import Window
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move import to top

Comment on lines +105 to +107
CATALOG = "prd_corpdata"
SCHEMA = "dm_reference_gold" # v_dim_country would be more suitable for currency/country data, but it currently lacks comprehensive data. May switch to this table in the future.
TABLE = "v_dim_country_currency_exchange_rate"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to define these constants as they are only used in the construction of base_df. Also, as a best practice, please avoid redefining constants – these constant names are used again on line 133-135.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants