metabase_api_python icon indicating copy to clipboard operation
metabase_api_python copied to clipboard

feat(clone_methods): collection, dashboard and card

Open lucmerceron opened this issue 1 year ago • 4 comments

Hello,

This MR encapsulates a bunch of scripts that we use at our company when we want to clone a collection and its components (dashboards / cards) while changing the targeted database of the cards to another one. This is useful when we have a new client and we need to instantiate a template collection for its database or when we need to duplicate a collection to do some tests without putting noise into the original one.

I couldn't properly create tests for the functions. Related to https://github.com/vvaezian/metabase_api_python/issues/18 & https://github.com/vvaezian/metabase_api_python/issues/32

Regards

lucmerceron avatar May 30 '24 14:05 lucmerceron

Codecov Report

Attention: Patch coverage is 3.75000% with 154 lines in your changes are missing coverage. Please review.

Project coverage is 51.88%. Comparing base (607f5b8) to head (3cd752e). Report is 6 commits behind head on master.

:exclamation: Current head 3cd752e differs from pull request most recent head 9c1140e

Please upload reports for the commit 9c1140e to get more accurate results.

Files Patch % Lines
metabase_api/clone_methods.py 2.68% 145 Missing :warning:
metabase_api/_helper_methods.py 10.00% 9 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           master      #52       +/-   ##
===========================================
- Coverage   62.39%   51.88%   -10.51%     
===========================================
  Files           7        8        +1     
  Lines         734      900      +166     
===========================================
+ Hits          458      467        +9     
- Misses        276      433      +157     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar May 30 '24 14:05 codecov-commenter

Hi @lucmerceron, thanks for the PR. I'll review it soon.

vvaezian avatar May 30 '24 16:05 vvaezian

Thanks @vvaezian, tell me if I can be of any help

lucmerceron avatar Jun 05 '24 16:06 lucmerceron

@lucmerceron If you can create some unittests that would be great. There is a sqlite DB in tests/data. You can duplicate that with a different name and use it as the target db. You can use https://sqliteviewer.flowsoft7.com/ to view the content of sqlite DBs. Instructions for unittesting is available in the tests dir.

vvaezian avatar Jun 06 '24 16:06 vvaezian

Hi @lucmerceron,

At Intellimenta we have developed DataBot, a conversational analytics app that connects with Metabase and enables users to ask questions about data and visualize the results using natural language in their preferred language.

If your company uses Metabase, DataBot can significantly enhance how your team and customers interact with data.

If you're interested in learning more, you can book a demo using this link. Happy to discuss further.

vvaezian avatar Apr 02 '25 18:04 vvaezian