# Copy Data from Datalink to New Matrices

Hi,

I am using Data Link to connect to my database and import data. After importing the data I have applied different filters to eliminate unnecessary data. I am trying to copy this filtered data in to a new matrix and when ever i update my datalink i want the new matrix also to be updated, but linking the columns is resulting in transferring unfiltered data in to a new matrix.

Is there any procedure to connect filtered data obtained from Database to a newmatrix?

Thank you

Vishnu,

Per Mike’s invitation “If anyone else has a different way to approach this question don’t hesitate to post.” I have the following.

Solution: RichFilter Helper Example

1. Create a filters matrix.

2. Then create helper items in the Database Matrix that reference the fitlers matrix (see the yellow items).

3. Once step 3 complete, create a datalink with a Two Dimensional Matrix Data source that references the Database matrix in step 2.

3. Bring in as a Multip-dimensional matrix those helper columns created in step 2.

4. Once the datalink brings back a new matrix apply a filter that excludes the !Blank

See Data Matrix under the RichFilter Helper Example as the Example.

Changing the inputs in the Filters matrix then updating the datalink creates the desired output. This eliminates the need for DataPush and DataNAV.

Solution: Rich DataNav Two DimensionalExample

Another solution I have instead of using the Datapush to DataNAV as demonstrated by Mike is simple to Use DataNAV and have the source for DataNAV be a two dimensional matrix.

1. In Data Sources Pane select Data Source Wizard

2. Select DataNAV Local Data Source

3. Two Dimensionla Matrix Data

4. Browse to this same file

5. Select A (Database Matrix)

6. Headers as the Category to Use as the Column Category

7. Give this a name

8. Drag and drop like you would in Mike’s example using DataNAV.

This saves you from creating an h2 database somewhere, but functions more or less the same as Mike’s example.

Good Luck.

–Rich

Hi,

Can you be more specific about this, I could not find any inbuilt function "where".

I do understand that Filters can be created as formulas in new matrix but to import the filtered data i have to manually create rows and columns.

In matrix A (Unfiltered data) Rows -80000, columns -10.

matrix B (Filtered data) Rows – 2100, Columns – 10.

Every day the database is updated and number of rows in matrix A increases which results in increase of matrix B rows. I tried to do this by linking matrix A & B but this results in creating 80000 rows in matrix B. I want the rows equivalent to the filtered data obtained.

Why can’t i use the inbuilt filters and link both matrix?

Hi Mike,

I have attached a sample model. In this model assume that Data in Matrix A is obtained from datalink and gets changed when ever datalink is updated. Currently there are 30 rows of data and after filtering the data based on Type: SO10, Month: 6, City: Indio we obtained 12 rows, I want to link this filtered data in to a new matrix B(I.e Matrix B should contain only 12 rows of data). If the data in matrix A increases then matrix B should also have changes with rows inserted or deleted.

Hi – one way to approach this is via our DataPush and DataNAV products.

You can use DataPush to push the database data into a local data store that can be used by DataNAV, then use DataNAV to bring in the data with the filters desired. See attached model.

The Database matrix has the datapush assigned to it… and Matrix4 has the DataNAV.

This may be a bit more than can be easily explained via a forum post. I think you are trialing the software? Perhaps we could set up an on-line demo in the near future. We should have some availability to do this next week. In the meantime please refer to the DataLink, DataPush and DataNAV products in the on-line documentation for ideas.

If anyone else has a different way to approach this question don’t hesitate to post.

Hi Lopez,

Thanks for the solution. This solution works for filtering the required data in to a new matrix, but when i am linking this new matrix to a another matrix the number of rows are not same.

I am using SQL work bench to obtain required population and the i am importing it to Quantrix.

Also In Quantrix Filtering in one matrix does not automatically filter the matrices linked to it.

Regards,

Vishnu