Skip to content

Commit

Permalink
make long_to_wide True by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Marigold committed Dec 10, 2024
1 parent 5803292 commit 8b60c21
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion etl/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def variable_metadata_url(variable_id):
MAX_VIRTUAL_MEMORY_LINUX = 32 * 2**30 # 32 GB

# increment this to force a full rebuild of all datasets
ETL_EPOCH = 5
ETL_EPOCH = 6

# any garden or grapher dataset after this date will have strict mode enabled
STRICT_AFTER = "2023-06-25"
Expand Down
6 changes: 5 additions & 1 deletion etl/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def create_dataset(
default_metadata: Optional[Union[SnapshotMeta, catalog.DatasetMeta]] = None,
underscore_table: bool = True,
camel_to_snake: bool = False,
long_to_wide: bool = False,
long_to_wide: Optional[bool] = None,
formats: List[FileFormat] = DEFAULT_FORMATS,
check_variables_metadata: bool = False,
run_grapher_checks: bool = True,
Expand Down Expand Up @@ -281,6 +281,10 @@ def create_dataset(

from etl import grapher_helpers as gh

# Default long_to_wide for grapher channel is true
if long_to_wide is None:
long_to_wide = ds.metadata.channel == "grapher"

# Expand long to wide
if long_to_wide:
if ds.metadata.channel != "grapher":
Expand Down

0 comments on commit 8b60c21

Please sign in to comment.