Skip to content

Commit

Permalink
Fix comment and param
Browse files Browse the repository at this point in the history
  • Loading branch information
BielStela authored and alexeh committed Oct 10, 2023
1 parent d292a37 commit 2c54fd7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data/h3_data_importer/raster_folder_to_h3_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def update_for_material_indicator(cursor: psycopg.Cursor, dataset: str, column_n
if not indicator_id:
log.warning(f"Indicator with 'nameCode' {dataset} does not exists")
raise ValueError(f"Indicator with 'nameCode' {dataset} does not exists")
# todo: convert to script parameter
# todo: convert to script parameter or something that is not hardcoded for a specific case.
spam_id = f"spam_{column_name.split('PerTProduction')[0].lower()}" # something like 'spam_ocerwhea'
cursor.execute('select id from material where "datasetId" = %s', (spam_id,))
material_ids = cursor.fetchall()
Expand Down Expand Up @@ -219,7 +219,7 @@ def to_the_db(df: pd.DataFrame, table: str, data_type: str, dataset: str, year:
@click.argument("table", type=str)
@click.argument(
"data_type",
type=click.Choice(["production", "harvest_area", "indicator", "material_indicator"], case_sensitive=False),
type=click.Choice(["production", "harvest_area", "indicator", "material_indicator"], case_sensitive=True),
)
@click.argument("dataset", type=str)
@click.argument("year", type=int)
Expand Down

0 comments on commit 2c54fd7

Please sign in to comment.