Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Connect to a .SQL file

jonathanogrady
8 - Asteroid

Hello fellow Alteryx fans!

I was looking for some help to connect to a .SQL file please.

I have been provided with some data which users typically connect to installing MySQL and then generating a local database.

At the moment I have saved this .SQL file locally, but the Alteryx input connector does not seem able to "see it".

Perhaps I need to use the in database connection? However, when I look for a connection file it specifies .INDBC type and also cannot "see" my .SQL file.

My first time trying to make this sort of connection. I must be doing something stupid. Any guidance gratefully received!

Many thanks,

Jonathan

8 REPLIES 8
NicoleJohnson
ACE Emeritus
ACE Emeritus

If you change your input tool to allow you to see all files (*.*), you should be able to see the .sql file and then you can bring in the data as a text delimited file. From that point, you can concatenate the data and feed it into a Dynamic Input tool to run your query. Does that point you in the right direction?

 

SQLFile.JPGFileType.JPG

 

Cheers!

NJ

jonathanogrady
8 - Asteroid

Thank you so much for taking the time to reply to my question.

Unfortunately, your solution does not help in this case. If I choose all data files, I can still not see the .SQL file.

I believe that this is because the .SQL file is not actually a file but is a package which contains various tables which need to be "constructed" into a database.

This is typically done in MySQL. I have completed this step, but I would now like to connect Alteryx to that local database, but I'm unsure how to proceed.

Very grateful for any other suggestions…

jonathanogrady
8 - Asteroid

Just to be clear, I have completed the following steps:

I have downloaded and configured MySQL

In MySQL I have created a user "company@localhost"

then I created a database called "company"

Finally, I granted company@localhost full permissions for company.*

I then loaded the database by targeting the file < data.sql

This database contains various tables which I would now like to be able to access and join through Alteryx… This is where I'm stuck!

I'm sure it's very easy and I'm just being a dolt, so your patience gratefully appreciated!

BenMoss
ACE Emeritus
ACE Emeritus

If you read @NicoleJohnson's advice with more attention you see we need to select 'all files' NOT 'all data files'. This is located at the bottom of the file list.

 

Ben

LordNeilLord
15 - Aurora

Hey @jonathanogrady

 

If you have already loaded the data into your MySQL database then you need to connect to it via ODBC (rather than a flat file).

 

You will need to configure the ODBC first which you can do through the ODBC Admin (which appears when you choose ODBC from the "Other Databases" option in the input tool)

 

Create a new ODBC connection and then you should be able to connect to the data.

 

I tried to setup a local instant of MySQL but I didn't get very far...but there are lots of guides on how to connect (I think the server will just be localhost)

 

MySQL.PNG

 

@LordNeilLord

Part time Tableau, Part Time Alteryx. Full Time Awesome


Data Lover

jonathanogrady
8 - Asteroid

Thank you very much for having a crack at my question. Very much appreciated.

I'm not quite there, but I will continue to try and be sure to post a complete answer should I find one.

In the meantime, if anyone can stand on the shoulders' of these giants, very much appreciated!

jonathanogrady
8 - Asteroid

Bingo! Your genius!

So I went back to the MySQL configuration and added the MySQL connector/ODBC

I then went to Alteryx and chose to add a new ODBC connection, specifying the server "localhost" with the user "company"

Hey presto, I have access to all the tables in the data!

Consider this issue solved. Hopefully others will find it useful.

Many thanks to all,

Jonathan

LordNeilLord
15 - Aurora

Hey @jonathanogrady Haha! I just got there myself! Glad I could help :::::::) I'd appreciate an accepted solution when you get a moment.

 

MySQL3.PNGMySQL2.PNG@LordNeilLord

Part time Tableau, Part Time Alteryx. Full Time Awesome


Data Lover

Labels