Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dateformat of timestamp field for the flights.json.gz test dataset #440

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/sphinx/examples/demo_notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4030,7 +4030,7 @@
"Mappings:\n",
" capabilities:\n",
" es_field_name is_source es_dtype es_date_format pd_dtype is_searchable is_aggregatable is_scripted aggregatable_es_field_name\n",
"timestamp timestamp True date strict_date_hour_minute_second datetime64[ns] True True False timestamp\n",
"timestamp timestamp True date strict_date_optional_time datetime64[ns] True True False timestamp\n",
"OriginAirportID OriginAirportID True keyword None object True True False OriginAirportID\n",
"DestAirportID DestAirportID True keyword None object True True False DestAirportID\n",
"FlightDelayMin FlightDelayMin True integer None int64 True True False FlightDelayMin\n",
Expand Down
2 changes: 1 addition & 1 deletion tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"OriginRegion": {"type": "keyword"},
"OriginWeather": {"type": "keyword"},
"dayOfWeek": {"type": "byte"},
"timestamp": {"type": "date", "format": "strict_date_hour_minute_second"},
"timestamp": {"type": "date", "format": "strict_date_optional_time"},
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/field_mappings/test_metric_source_fields_pytest.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def test_flights_all_metric_source_fields_bool_and_timestamp(self):
assert pd_metric.columns.to_list() == ed_fields
assert len(es_date_formats) == len(ed_dtypes)
assert set(es_date_formats) == set(
{"strict_date_hour_minute_second", None}
{"strict_date_optional_time", None}
) # TODO - test position of date_format

def test_ecommerce_selected_non_metric_source_fields(self):
Expand Down