Okay
  Public Ticket #3528337
merge two data charts
Closed

Comments

  • andrea started the conversation

    Hello

    We have an environmental data observation site from which we take data that is processed, and packaged as csv and sent to our VM with wordpress.
    The scripts that do this manipulation create multiple csvs.

    I have been asked to create charts that graph columns taken from multiple csv files.

    How would I go about this?

    Is there any functionality that will combine 2 wpDataTables for me and create a "merged" one?
    Or can I take a column from 1 table and add it to another?

    Fortunately, the data has the same timestamp (so I don't have sync problems) but I would like to avoid doing additional manipulation in bash to create the csvs.

    thanks

  •  1,708
    Miloš replied

    Hi andrea,

    Firstly, I would like to sincerely apologize for the delayed response as we have been experiencing an unusually high number of tickets. I am sorry that it has taken longer than usual to respond to your concern and your patience is highly appreciated.

    -

    I am sorry to disappoint you, but there is no way to join data from multiple CSV Files into one Table;

    Or if you make multiple Tables linked from multiple CSV files to somehow join some columns/data between the CSV linked Tables.


    The only way we have to join data between multiple tables is if you switch to SQL Based Tables.

    For example, if you import the data from each CSV with our Plugin :

     If you import the file, the plugin reads the source CSV file and creates a manual table

    That will be a stand-alone SQL Table in your WP Database with its own set of columns and rows;


    Once the table is created, it is no longer linked to the source  CSV file, so changing data in the table will not show up in CSV, and vice-versa. 

    But the table becomes editable in our Plugin, and you can make SQL Queries from it.

    For quicker editing, if needed - you can either switch to the Excel-like view

    and then select and copy the range of cells you want to paste from the source file, and paste it in the Excel-like view, 

    or you can import a new/edited CSV to update the table, as well, in the following ways :

    -


    So later, you can call SQL Queries ( SQL Query based Tables ) to pull that data.

    When you need to check for each imported/Manual Table what is their SQL Name - just go in the Editing Settings, and find "My SQL Table Name".

    Then you can use that like :  SELECT * FROM TableName in a new SQL Query based Table.

    -

    To merge data from multiple Manual Tables, you can either use SQL JOIN function to merge data between them;

    Or you can try our Foreign Key Column feature to call column values from a foreign Table.


    That is the only way to 'merge' data between multiple tables in our Plugin at the moment.

    Then with such a merged SQL Table, you will be able to create a Chart from it.

    Each Chart can only take 1 Source Table for its data.


    Let us know if that helps.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables