How to work with SQL Editor & Python Notebook in Mode Analytics

Transcript

After creating your account, you should reach here, which is an untitled report. Let's navigate a bit. So click on the three dots on the left and you should see the left navigation.

Let's go to the My Work tab where you will see all your reports. So currently, we don't have any reports. So let's go ahead and create a new report. You can do this by clicking the New Report button.

So let's go ahead and do that. And now it creates a new report. Here, you can access the SQL tab to access all the databases.

You can just write databit and you will get the details about all our data structures or databases. Now let's go ahead and write a query.

"SELECT * FROM databit.startups;"
To run the query, you have to select the query and then hit the
Run Selected button.

And now you should be able to access and get, the number of rows here and the data that you want.

So this is SQL editor. If you go here and create a New Notebook, that will create a new Python notebook.

So let's go ahead and do that. So this creates a new Python notebook, and it will print out all the queries that you have run in your query editor.

So this is the QRef or the query ID, which you can copy-paste to create a new data frame. We can just use the datasets function and we can use the Query ID for this.

And let's go ahead and print that. So if you do that, we will store a hundred rows of data that we had in the above query into a new data frame.

Don't worry if you don't get this, just make sure that you remember that this is our SQL editor.

And to write a query, you just write it in the editor tab, select that query, and hit the select button to run a query.

To access a Python notebook, you will need to click the Python notebook button and we'll create a new Python notebook for you.

Complete and Continue  
Discussion

0 comments