Using Google Sheets to pull Steemit data from steemsql

in #technology7 years ago

Those who have been following my bisteemit posts might have noticed that I always make it a point that I use Google Sheets, not Excel.

So how do I use it?
Does data appear on the document magically?

Life would have been much simpler, if magic was true!

When you do not understand the inner workings of something you tend to call it magic.
Religion works on the same principle! (That is the agnostic in me, ignore that part if you feel offended.)

Now I'll stop beating around the bush - Google Docs has it own version of VBScript called Google Apps Script that is based on Javascript. You can use it your Docs, Sheets or Forms

Data Source

I usually connect to the excellent steemsql.com provided by @arcange.

Steps:
  • Open a new Google sheet, Navigate to 'Tools' and then click on 'Script Editor'.
  • It opens the below window:
  • By default, it’ll open with a single Google Script file (code.gs) and a default code block, myFunction(), You can change the name of the function to your liking.
    *Now define your JDBC connection to steemsql. Here's a screenshot of my connection parameters:

*Now you can establish connection to the sqlserver inside the function as

  • After establishing the connection, you can call a query as follows:

  • You can direct the resultset to any sheets you want.

  • Remember to close your resultset, statement and connection before you close your function:

  • Now save the function, debug it if necessary and then click on run after selecting the function from the dropdown:

Tada - you get the results, no magic!
Check out more cool stuff about Google Apps Script at http://www.googleappsscript.org/

I am a part of the Steemit Business Intelligence community. We all post under the tag #BIsteemit. If you have an analysis you would like carried out on Steemit data, please do contact me or any of the #bisteemit team and we will do our best to help you...

Join the fabulous Steemit Blogger Discord community:
https://discord.gg/e5XFZKa

...and do not forget to
Steem Tail.jpeg

Cheers,
dbdecoy

Sort:  

The @OriginalWorks bot has determined this post by @dbdecoy to be original material and upvoted it!

ezgif.com-resize.gif

To call @OriginalWorks, simply reply to any post with @originalworks or !originalworks in your message!

To enter this post into the daily RESTEEM contest, upvote this comment! The user with the most upvotes on their @OriginalWorks comment will win!

For more information, Click Here!
Special thanks to @reggaemuffin for being a supporter! Vote him as a witness to help make Steemit a better place!

This post recieved an upvote from minnowpond. If you would like to recieve upvotes from minnowpond on all your posts, simply FOLLOW @minnowpond

Very informative! Thanks for sharing! Deserved to be upvoted!

Thank you!

One better not write anything on Steemit that you might regret later on, as the data will be easily accessible by anyone for as long as the blockhain exists.

Technically one can edit before payout.

So the data isn't stored on there blockhain until payout, after a week?

The data gets stored, but it's not displayed on the front-end.

what is the difference from any other social media lol... they all have your info

This post received a 2.62% upvote from @randowhale thanks to @dbdecoy! To learn more, check out @randowhale 101 - Everything You Need to Know!

Coin Marketplace

STEEM 0.20
TRX 0.20
JST 0.034
BTC 89955.66
ETH 3105.10
USDT 1.00
SBD 2.98