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

Adding multiple, different (SQL / MySQL) data sources breaks smart variables. #96

Closed
dreger opened this issue Nov 3, 2016 · 2 comments

Comments

@dreger
Copy link

dreger commented Nov 3, 2016

Previously, I had set up Blazer with a single MySQL data source. I had several smart variables set up and working. Here's an excerpt:

smart_variables:
      company_id: "SELECT id, name FROM companies ORDER BY name ASC"
      product_id: "SELECT id, name FROM products ORDER BY name ASC"
      team_id: "SELECT id, name FROM teams ORDER BY name ASC"

However, once I added an additional data source (this time an MS SQL database), the existing MySQL smart variables no longer displayed as select boxes. I only get inputs now.

Oddly enough, smart variables that pull from tables in the MS SQL database appear to be working.

I think the issue may stem from conflicting table names in the MySQL and MS SQL databases, eg. both database might have a products table, and the smart variable doesn't know which database to pull from. However, attempting to modify my blazer queries to include use mysqldatabase haven't fixed the issue. Thanks!

@ankane
Copy link
Owner

ankane commented Nov 4, 2016

Hey @kqdreger, smart variables should pull from their respective data sources without conflict. My hunch is the config is not correct. If you want to paste your YAML file (with private info removed), I can take a look.

@dreger
Copy link
Author

dreger commented Nov 4, 2016

I'm a dummy — I didn't see that smart variables were nested under each data_sources / database. I had all the smart variables in one group, and it happened to be nested under my MS SQL database. All clear now, thanks 👍

@dreger dreger closed this as completed Nov 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants