vvaezian / metabase_api_python

A python wrapper for Metabase API
MIT License
136 stars 40 forks source link

Update get_card_data #46

Closed fengdasuk19 closed 1 year ago

fengdasuk19 commented 1 year ago

swith visualization

:param is_visual to switch visualization visual tests pass on cards based on: [SQL]/[table]/[tables joined]

export xlsx

:param data_format now supports new value: 'xlsx'

use Python csv module to export csv each cell value is marked by double quote now

codecov-commenter commented 1 year ago

Codecov Report

Merging #46 (2361975) into master (64ab710) will increase coverage by 4.38%. The diff coverage is 95.52%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##           master      #46      +/-   ##
==========================================
+ Coverage   64.34%   68.72%   +4.38%     
==========================================
  Files           7        7              
  Lines         732      857     +125     
==========================================
+ Hits          471      589     +118     
- Misses        261      268       +7     
Impacted Files Coverage Δ
metabase_api/metabase_api.py 70.89% <89.18%> (+2.77%) :arrow_up:
metabase_api/_helper_methods.py 58.13% <96.00%> (+11.47%) :arrow_up:
tests/test_metabase_api.py 99.47% <100.00%> (+0.16%) :arrow_up:

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

fengdasuk19 commented 1 year ago

Values of field with type/Date may be changed from something like '2023-02-22'(/query/json and the original value in database[postgres]) to something like '2023-02-22T00:00:00+08:00'(/query), where '+08:00' means timezone (UTC+8). Such results may not everyone wanted, and I cannot solve this problem quickly. That's why I closed this PR temporarily.

Check these two implementations for more details: /:card_id/query vs /:card_id/query/:export-format.

vvaezian commented 1 year ago

Hi @fengdasuk19, thanks for the contribution. I wanted to review your PR, but I noticed you closed it a few times. So I'll wait for the final version.