Laravel livewire, displaying the result of two queries in one grid component - laravel

I need to display two datasets coming from the same MySQL database table inside a Laravel Livewire grid component. One dataset contains all the entries from the last 20 minutes and one dataset contains all the entries for the last 24 hours.
For grid component I am looking at https://github.com/mediconesystems/livewire-datatables
The table has the following structure:
ID: Integer
inserted_on: datetime
origination: string
field_count: integer
What would be the best way to achieve this in Laravel with Livewire?

Related

Import range after the last blank row

I need help creating Dash Board. Sheet1 is a live Form response Sheet with all the data. Sheet2, Sheet3, and Sheet4 all have pivot tables pointing to data in Sheet1. I want to create a Dashboard in Sheet5 with data from the pivot tables in Sheet2,3 and 4 one after the other. The problem I am facing is if more rows are added to Pivot in Sheet2, the data disappears in Sheet5. I want to list all pivot data in all sheets that will recognise the last blank row and place the pivot data one after the other.

Extract tables from pdf using anchor using Document Understanding in UiPath?

I am trying to extract tables from pdf files. I am using UiPath's Document Understanding for this purpose. I have to create a template for this purpose and then use that template for other similar invoices. The issue I am facing is that the number of items in the table is varying. For example some pdf's have table which contain 4 items whereas other pdf files have table which contain only 1 item. So if I create a template using the pdf which has a table containing 4 items then it works. But then the same template when used for files which have table containing 1 item then it does not properly extract the data in the table. Is there any solution for this?
The solution should be able to extract tables from similar invoices containing varying number of items in the table. The format and layout of the invoice and the table is similar. The only thing varying is the number of items in each table.
Thanks for your time and help!

How do i extract multiple tables(35-40 tables) from a html website into one excel file?

Currently, am trying to retrieve data from this page: https://www.hdb.gov.sg/cs/infoweb/residential/renting-a-flat/renting-from-the-open-market/rental-statistics , as you can see, there are 4 quarters in a year, and for each quarter, there is a different table. I wish to extract the table but currently, i am unable to automate the process, only able to take one. On top of that, i wish to add two columns to the retrieved data table which is "Quarter" and "Year". Any suggestions? Attached photos are my workflow and my excel.
Get the number of years/ loop through the years (or start with the 1st year up to the last year).
For each year try to get the data via data scraping (the elements exist, just hidden/not expanded ; do one table datascraping for data modelling and reuse it within the loop). For the datascraping you need to change the selector, to make it usable for all tables by using the year and the quarter (just a generic example, like * year * quarter *). Columns are the same for all tables.
I haven't seen details within the website menu or within the page, is good to check if robots are allowed to scrape for data
Above would be the quickest way. More complex with FindChidren activity.

Laravel 5.4 - Saving Excel data into dynamically created columns in MySQL

I have a internal webpage that makes data from excel searchable and readable from a 3rd party excel export file. The webpage allows for the uploading of multiple excel files in which the data gets read and stored in a MySQL database.
We want to update the application to keep a history of the uploaded data (it's data that has monthly values) so we can easily search, filter and generate graphs from the uploaded data.
So I am using Laravel 5.4 and have maatwebsite\excel to import and parse the excel file.
The Excel file always consists of the following columns (Dummy File)
| Item group | item # | item name | Item Currency | <month> <year> |
After Item Currency there is always 36 columns for the past 3 years of data from the current month so a column would be named like dec 2017
Now in Laravel I have created a Model for the item named Item and a model for the monthly values named ItemMonthly
Now I am able to read the file and create columns dynamically in the database but I feel like this is very ugly and not efficient at all:
(Gist) Code for Models and Excel Function
Biggest problem
Because I need to read all the monthly data and since I need them in order of month I can't really rename all the columns as far as I know. I need to be able to get all the columns to render in a Highchart graph and in a Datatable. and some items don't have the same monthly data (some only go till 2015 for example.
Needed advice
I've read a couple of solutions here some of them saying instead of creating columns in MySQL just store the monthly data as a json object in a single column.
Some answers just completely advice on changing from MySQL to MongoDB
I am kind of at a loss to find the best approach for this, and am sincerely wondering if MySQL is the right way to go. The solutions I have been trying so far all seem to involve really hacky ways of doing this.
If there is more info needed please let me know. I don't want to write an immense wall of text but I also want to provide the correct amount of information.
Many thanks!

SSRS - Create sparkline from a dataset with multiple fields in columns

I am trying to create a single sparkline from a dataset which contains multiple fields in different columns of tablix. To explain in details:
I have a tablix with 12 columns. Each column gets value from a different field in the dataset. It means that I have 12 fields in dataset and each goes to one of those 12 columns. The problem is, I am trying to create a sparkline in the 13 column for each row, however, when I create a sparkline it create 12 sparklines. However, I want one sparkline with field values from 1 to 12 months, one after the other.
I am stuck with this since 2 days. Can anyone help with this?
If processing time is not of an issue, try building a second data set and do a lookup for the sparkline.
Second, you may be able to un-pivot your data and use matrix to build sparkline.
Table on Top, Matrix below

Resources