Intro
Si me sigues, habrás descubierto que lance hace poco una propuesta en Hive para una herramienta antiplagio (revisa si no lo has hecho), esta herramienta utiliza HiveSQL para leer el contenido que se crea en la blockchain. Por ello, hoy te voy a hablar de HiveSQL y como tú también puedes utilizarla sin ser desarrollador. Te adelanto que podrás saber todo lo que se te ocurra de la blockchain, tendrás acceso a todo el contenido, transferencias y hasta las ordenes que se crean en el mercado interno. Encima de todo eso, es totalmente gratuita, gracias a la propuesta de @arcange que permite esto y que pueden apoyar aquí.
Intro
If you follow me, you may have discovered that I recently launched a proposal on Hive for an anti-plagiarism tool (check it out if you haven't), this tool uses HiveSQL to read content that is created on the blockchain. So today I'm going to tell you about HiveSQL and how you too can use it without being a developer. I'll tell you in advance that you will be able to know everything you can think of on the blockchain, and you will have access to all the content, transfers, and even the orders created in the internal market. On top of all that, it's free, thanks to @arcange's proposal which enables this and which you can support here.
¿Qué es HiveSQL?
Como dice en su sitio web, es una base de datos publica en formato SQL que contiene toda la información de la blockchain de Hive. Para que tengan una idea del tamaño, vienen siendo alrededor de 1.70TB de información almacenada en esta base de datos. Es por ello que si solo necesitas acceder a la información existente en la blockchain para su análisis o una visualización diferente, pues esta es la mejor vía para hacerlo. Es su principal propósito, ahorrando así tiempo y recursos cuando se hacen llamados directos a la blockchain que aquí no son necesarios.
Cualquier persona puede acceder y utilizar esta base de datos, que como ya les mencioné es gratuito mientras la propuesta para ello se mantenga aprobada por la comunidad. Pero por razones de seguridad y para impedir cualquier abuso de esta, deberás crear una cuenta de HiveSQl en solo tres sencillos pasos. Aunque quizás lo veas como un solo paso:
- Transferir 1HBD a @hivesql sin ningún memo.
- Al recibirlo se comenzará a activar tu cuenta
- Recibirás una pequeña transferencia de vuelta que contendrá los datos de cuenta en el memo.
Así de sencillo, solo haces una transferencia y en poco tiempo tendrás los datos de tu cuenta que necesitarás para acceder. Los datos se envían encriptados mediante el memo, es por ello que solo tu podrás ver dicha información. Esto lo podrás ver desde Keychain en el historial de transferencias o en la sección de billetera de tu frontend preferido. En algunos como Peakd deberás darle un botón de un candado para que se muestre la información. Si aun así no se muestra, deberás asegurarte de tener configurada tu llave memo.
What is HiveSQL?
As it says on their website, it is a public database in SQL format that contains all the information from the Hive blockchain. To give you an idea of the size, it comes to be around 1.70TB of information stored in this database. That's why if you just need to access the existing information in the blockchain for analysis or a different visualization, well this is the best way to do it. This is its main purpose, thus saving time and resources when making direct calls to the blockchain that are not necessary here.
Anyone can Access and use this database, which, as I mentioned, is free as long as the proposal for it remains approved by the community. But for security reasons and to prevent any abuse of it, you will need to create a HiveSQl account in just three simple steps. Although you may see it as a single step:
- transfer 1HBD to @hivesql without any memo.
- Upon receipt, it will start activating your account.
- You Will receive a small transfer back containing the account data in the memo.
It's that simple, you just make one transfer and in a short time, you will have the account data you will need to log in. The data is sent encrypted through the memo, so only you will be able to see this information. This can be seen from Keychain in the transfer history or the wallet section of your favorite frontend. In some frontends like Peakd, you will have to click on a padlock button to display the information. If it still doesn't show up, you will need to make sure you have your memo key configured.
Acceder a SQL
Vamos al arroz con pollo. Lo primero será descargar alguna aplicación que sea capaz de conectarse a un servidor MS-SQL. Yo utilizo Navicat Premium y si eres cubano sabrás como debes buscarlo, sino solo deberás googlear su sitio web, descargar, pagar y usar. Si no logras obtener me puedes contactar para ayudarte. Una vez descargado e instalado, vamos a configurar el acceso a HiveSQL. Para ello abrimos Navicat y le damos a crear una nueva conexión de SQL Server. Nos mostrara la siguiente ventana, que como ven, ya rellené con la información que me fue enviada en la transferencia.
Access SQL
Let's go to the chicken rice. The first thing will be to download some application that can connect to a MS-SQL server. I use Navicat Premium and if you are Cuban you will know how to look for it, if not just google their website, download, pay, and use it. If you can't get it you can contact me to help you. Once downloaded and installed, we will configure the access to HiveSQL. For it, we open Navicat and we give to create a new SQL Server connection. It will show us the following window, which as you can see, I already filled in with the information that was sent to me in the transfer.
Listo, si la conexión se realizó con éxito podrás ver en la barra izquierda el acceso a la base de datos y comenzar a interactuar. Toda la información se encuentra en dbo->Views. Toda la ayuda que necesites sobre estas vistas y la informacion que muestra cada columna la puedes obtener en la documentación de HiveSQL. Pero déjenme darles un caso de uso.
Ready, if the connection was successful you will be able to see in the left bar the access to the database and start interacting. All the information can be found in dbo->Views. All the help you need about these views and the information shown in each column can be found in the HiveSQL documentation. But let me give you a use case.
Un ejemplo
Digamos que tienes conocimientos de trader como @nanixxx, vas a necesitar saber cada compra o venta de Hive que has hecho en el mercado interno para conocer sus ganancias/perdidas. Bastara con ir a la vista VOFillOrders y filtrar nuestro usuario como hago en la siguiente imagen mediante la columna current_owner.
An example
Let's say you have trader knowledge like @nanixxx, you are going to need to know every Hive buy or sell you have made in the internal market to know its profit/loss. Just go to the VOFillOrders view and filter our user as I do in the following image using the current_owner column.
Solo con esto ya nos muestra todas las órdenes de venta y de compra que se han ejecutado desde nuestro usuario. Nos muestra cuanto Hive y HBD se intercambió en cada una, por lo que es fácil calcular el precio que se utilizó durante la operación. Hasta con quien se realizó el intercambio, que muchas veces me ha tocado con el bot que regula el precio del HBD. Todo informacion que busquen pueden exportarla a una tabla de excel y otros formatos para cualquier uso que deseen darles. Ya queda por ustedes darles el uso que crean necesario y aunque me tienen para resolver cualquier duda, también pueden unirse al discord de HiveSQL para cualquier ayuda que necesiten.
Only with this it already shows us all the sell and buys orders that have been executed from our user. It shows us how much Hive and HBD were exchanged on each one, so it is easy to calculate the price that was used during the trade. Even with whom the exchange was made, many times I have had to deal with the bot that regulates the price of the HBD. Any information you are looking for can be exported to an excel table and other formats for any use you wish to make of it. It is up to you to use them as you think necessary and although you have me to solve any doubt, you can also join the HiveSQL discord for any help you need.