I am new to mysql and databases in general. I've come across a problem that I can't seem to find a solution too. I'm not sure even how to word the scenario.
Basically I have a concatenated field that I need to take "explode" and make each value its of that field its own row. I'm pulling this data from a daily feed, so this needs to be automated as either a trigger, stored procedure, or scheduled job in Talend. Here is a simplified version of the situation. Please see the "current file format" and the "desired outcome" pics. Sorry- this is my first post here! Any help would be appreciated!
I am using a mysql database. Currently the file is coming in via csv export, but I will be connecting via Talend Open Studio to sync the data. See the links below for and example. Here is a sample.
A precise answer is difficult without seeing your code, and the sample link returns 404 for me. You should be able to do this within Talend. Try using Talend’s tExtractDelimitedFields or tExtractRegexFields commands to achieve the result you want.
Related
I ask this question, because I don't even have a clue what to google for. I have a MariaDB database which I access through node.js' mysql module. I write my code in TS.
My problem is, that the database I try to access will collect millions of datasets over time, and querying it might take awhile. I want would want to find a way to parse the database and serve one dataset whenever it is found instead of querying the whole database first and then sending an accumulated result.
Do you have any clue how I can solve this or what to google / YouTube search for?
I am quite new to NodeJS but I've written a few apps (like a chat, real time page updater etc) And I've used mysql to read from my database and emit() information to my webpage, but how can I have nodeJS watch a database table and emit() whenever a row is added?
I have no idea where to start and google didn't produce much results. However there must be an include I can require() that will watch the database in someway.
The answer really isn't a nodejs question, but a mysql question. If mysql itself can tell you ( via an event or log ) that a row was added, nodejs could read and consume that data. Unfortunately, that doesn't seem to be possible, based on this answer. The answer suggests that the only thing you can do with mysql is to poll for new rows.
IF you're in control of inserting the data rows from nodejs itself, there shouldn't be any problem emitting those events after you get the confirmation it wrote, but I do not have enough information on your project to know what constraints you have.
UPDATE: Nice little npm package https://www.npmjs.com/package/live-sql seems to solve your problem I hope
EDIT: Please ignore the Database Type "MySQL". I have it set to H2 currently, I was just playing around with settings at the time of the screengrabs in an attempt to see if I could pinpoint what was going wrong.
My friend came to me tonight with an "Opportunity". He had a college student code a front end application to insert, update, delete, and view data on a local drive for a small company that he runs. The application broke when he updated windows, and now he needs to retrieve the data. He sent me the .mv.db file, so I did some digging and found that DbVisualizer could allow me to atleast use a simple MySQL query to pull his data out into an excel spreadsheet. According to him, there are only about 300 records in the database.
When I connect to the embedded H2 database, it opens up two empty databases.
Let me know if anybody knows what to do here. Thanks.
I ran into the same problem. Luckily my database was small as well so I could use SQuirreL SQL Client to open the database. It is not easy to get used to the user interface but it does a really good job.
If you want to export your data you probably want to change the settings (File -> Global Preferences, Tab SQL Script). I unticked the box 'Qualify .. with schema' to get valid SQL.
Also the date format is not standard conform. I used a text editor to get executable SQL.
I have my current project set up so that I can query across two databases on two different servers using the same LINQ to SQL data context (as outlined here.)
However, when I'm trying to call a function that is on the database that I manually edited the file for, I am getting errors.
I first noticed that the Source field in the Properties was grayed out, so I had to go into the xml of the dmbl file to edit the source. The Source now shows up correctly (DEVSQL01.MyDB.dbo.MyFunction), but when I try to call the function I get an error saying Invalid column name 'DEVSQL01'.
Does anybody know if what I'm trying to do is possible?
I ended up just recreating the function on the second database. If anybody finds another way to do it I'd love to hear it.
I have some corrupted data, an individual entry, in the database for my Magento installation. Since I can see the corrupted data displaying, I'd like to use a Magento extension to show me the database call displaying that data onscreen. Does such a tool exist? If not, what would be the best tool for SQL to gather this information?
You can see the SQL statement used to load a collection by using $collection->getSelect(). You'd have to narrow down the collection call first though, which might not be much help in your case.
http://blogs.ifuelinteractive.com/2009/10/18/logging-all-sql-in-magento/