Skip to content

feat(export_to_file): add multiple where conditions #86

@jardabezdek

Description

@jardabezdek

Currently, Client.tables.export_to_file supports one where condition for one column only:

def export_to_file(self, table_id, path_name, limit=None,
file_format='rfc', changed_since=None,
changed_until=None, columns=None,
where_column=None, where_values=None,
where_operator='eq', is_gzip=True):
"""
Export data from a table to a local file
Args:
table_id (str): Table id
path_name (str): Destination path for file.
limit (int): Number of rows to export.
file_format (str): 'rfc', 'escaped' or 'raw'
changed_until (str): Filtering by import date
Both until and since values can be a unix timestamp or any
date accepted by strtotime.
changed_since (str): Filtering by import date
Both until and since values can be a unix timestamp or any
date accepted by strtotime.
where_column (str): Column for exporting only matching rows
where_operator (str): 'eq' or 'neq'
where_values (list): Values for exporting only matching rows
columns (list): List of columns to display
is_gzip (bool): Result will be gzipped
Returns:
destination_file: Local file with exported data
Raises:
requests.HTTPError: If the API request fails.
"""

Please, add option to add multiple where conditions over multiple columns into the method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions