How to read and write data on CSV file using DB connector in Mule 3.8 - mule

How to read and write data on CSV file using DB connector in Mulesoft

The DB connector returns Java, so after the connector, you would have a transform message component that converts that Java to a CSV.

Related

creating file from sql data to csv in mule 4

I need to create file from SQL database and load data into CSV file. After CSV file generated successfully, need to transfer it to another sftp location.
I'm assuming that you are already familiar with Mule 4 applications and flows. In a flow you can query the database using the Database connector, use the Transform component to write a DataWeave transformation to a CSV (output application/csv), then use the SFTP connector to write the file to the SFTP server.
You should get familiar with how each component from the documentation to be able to write the database query, the transformation and the SFTP transfer.

WSO2 EI (ESB) - CSV File Data Validation

I am able to read the csv file using WSO2 EI and insert the csv data into MySQL DB as well. Picked the csv fle from sftp as also and inserted the csv file data into MySQL DB. I have followed the WSO2 doc from official web site.
But I am not able to validate the data. Please suggest how to write a Java class to put validation on CSV File data while reading it.

How to validate a excel file in mule

I am new to mule.I need to input a excel file to mule from a watch folder.i need to check wheather,that excel file is valid or not.
What is the best way to validate an excel file in mule
The EE edition has Datamapper which has out-of-the-box Excel support: http://www.mulesoft.org/documentation/display/33X/DataMapper+Excel+to+JSON+Example
I suppose you could attempt to parse the CSV using Datamapper and transform to check validiity.
But you can of course create a custom filter(http://www.mulesoft.org/documentation-3.2/display/32X/Using+Filters#UsingFilters-CreatingCustomFilters) or component with something like Apache POI: http://poi.apache.org/

WorkLight SQL Adapter : Upload an image using SQL Adapter

I need to upload an image to database as blob type using SQL Adapter And also i need to know how to get blob data from SQL Adapter.Will you please help me for inserting and retrieving blob data through SQL Adapter.
Taken from an old forum post:
Here is what I think of.
Write a servlet or whatever equivalent in your app server. In the servlet, you fetch the image from DB.
Encode the image binary contents according to BASE64.
Return the base64 string of the image.
Write an HTTP Adapter to visit the servlet you just write.
In your client application, you can insert the image into a by setting the "src" attribute to some value like
"data:charset=some_charset, ". For example,
"data:image/gif;base64,".
Message by MingZheHuang.

How can I import a csv file into the google cloud sql service (opposed to importing a sql dump)

How can I import csv files into the google cloud sql service (opposed to importing a sql dump)?
Can I in some way use the squirrel client?
Thanks
I just started using Google Cloud SQL. I connected to my instance with the MySQL Workbench. I created my first table, but then I wanted to import a CSV file into that table, and it was not clear on how to do that from MySQL Workbench. So, here are the steps to do this (thanks Aimon Bustardo):
Convert your CSV file to a SQL file using this site (there are other options to convert to SQL, but this is an easy service): http://csv2sql.com/
From MySQL Workbench Navigator for the MySQL instance, click "Data Import/Restore"
Click "Import from Self-Contained File" and then select the SQL file created in Step 1.
Click "Start Import" and your data is uploaded to the Cloud!
Converting it to SQL is your best be until they have a csv importer. There are command line utilities or online services. One of which that is free: http://csv2sql.com/