Skip to content

Commit

Permalink
Allow permissive fields on read/to options
Browse files Browse the repository at this point in the history
Allow extra fields to be specified when loading or materializing
dataframes. The extra options are passed to the underlying Pandas
implementations.
  • Loading branch information
kinghuang committed Aug 24, 2020
1 parent f1a9b73 commit 4318117
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,10 @@

def _dataframe_loader_config():
read_fields = {
read_from: {
read_from: Permissive({
option_name: Field(option_args[0], is_required=option_args[1], description=option_args[2])
for option_name, option_args in read_opts['options'].items()
}
})
for read_from, read_opts in DataFrameReadTypes.items()
}

Expand Down Expand Up @@ -273,10 +273,10 @@ def dataframe_loader(_context, config):

def _dataframe_materializer_config():
to_fields = {
write_to: {
write_to: Permissive({
option_name: Field(option_args[0], is_required=option_args[1], description=option_args[2])
for option_name, option_args in to_opts['options'].items()
}
})
for write_to, to_opts in DataFrameToTypes.items()
}

Expand Down

0 comments on commit 4318117

Please sign in to comment.