Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python API remap dictionary #36

Open
CHarvey93 opened this issue May 13, 2022 · 1 comment
Open

Python API remap dictionary #36

CHarvey93 opened this issue May 13, 2022 · 1 comment

Comments

@CHarvey93
Copy link

I am currently working with the Heavyai Python api to access/edit dashboards via databricks.
So far I can connect to my dash environment fine (I have the free version) - I use the following logic to build the connection:

from heavyai import connect
con = connect(user="admin", password="HyperInteractive", host="localhost",
              dbname="heavyai")

I then use the duplicate dashboard function to create a copy of a dashboard but with different data sources:

source_remap = {'oldtablename1': {'name': 'newtablename1'}, 'oldtablename2': {'name': 'newtablename2'}}
newdash = con.duplicate_dashboard(12345, "new dash", source_remap)

Duplicate dashboard creates a new dashboard, however remapping the data sources seems to only remap the first entry in the dict.
If I just do a remap without copying the dashboard, absolutely nothing changes. Is this a known issue?
Are there any possible workarounds to achieve the same result?

@jp-harvey
Copy link
Contributor

@CHarvey93 when the dashboard remap was implemented in pymapd it was done without a full set of tests associated with it due to time constraints and was marked as an experimental feature. Since then it looks like it was modified for when the dashboard tabs were introduced and the changes are not 100% clear to me given the repo renames / migrations to pyomnisci and heavyai.

It's not immediately obvious to me why you'd be having that issue looking at the code, I don't currently have a dev environment set up for heavyai so can't quickly replicate the issue, but if you could export and attach a sample dashboard you're having a problem with I could take a look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants