Skip to content

Commit

Permalink
feat: added timestamp to supported types for min and max (#431)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmedora committed Apr 8, 2022
1 parent 201f0a2 commit e8b4860
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions data_validation/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import os
import json
import os
import sys

from yaml import Dumper, dump

from data_validation import (
Expand All @@ -27,7 +28,6 @@
from data_validation.config_manager import ConfigManager
from data_validation.data_validation import DataValidation


# by default yaml dumps lists as pointers. This disables that feature
Dumper.ignore_aliases = lambda *args: True

Expand Down Expand Up @@ -74,11 +74,13 @@ def get_aggregate_config(args, config_manager):
"avg", col_args, supported_data_types
)
if args.min:
supported_data_types.append("timestamp")
col_args = None if args.min == "*" else cli_tools.get_arg_list(args.min)
aggregate_configs += config_manager.build_config_column_aggregates(
"min", col_args, supported_data_types
)
if args.max:
supported_data_types.append("timestamp")
col_args = None if args.max == "*" else cli_tools.get_arg_list(args.max)
aggregate_configs += config_manager.build_config_column_aggregates(
"max", col_args, supported_data_types
Expand Down

0 comments on commit e8b4860

Please sign in to comment.