The Siemens Community Catalyst program was co-created with our community to acknowledge technology leaders who consistently contribute to the Siemens Community. Nominations are accepted on a rolling basis.
Hi,
I am looking for a way to dynamically merge all columns after the first column. I have a table that will have a different number of columns based on the file selected in the file path, and I need columns 2 and on to merge. The files that are selected in the file path are unique from one another, so I need the merge to happen in a dynamic fashion.
Chase,
You're not giving us much to go on in terms of the type of source file or how the "columns" are identified.
There will be at least one technique for achieving your objective - maybe several approaches.
We could offer a consultancy arrangement for you to work through a solution without exposing any sensitive data to the world on the forum. Would that be of interest?
I'm sure Datawatch could provide the same sort of support through their technical services team.
The most immediate idea would be to use a calculated field in the table to concatenate the columns but I would imagine you have maybe already considered that and found it lacking something for your needs. If so that suggests that you need to consider the detail of the challenge in order to derive the most appropriate solution.
Grant
Chase, You're not giving us much to go on in terms of the type of source file or how the "columns" are identified. There will be at least one technique for achieving your objective - maybe several approaches. We could offer a consultancy arrangement for you to work through a solution without exposing any sensitive data to the world on the forum. Would that be of interest? I'm sure Datawatch could provide the same sort of support through their technical services team. The most immediate idea would be to use a calculated field in the table to concatenate the columns but I would imagine you have maybe already considered that and found it lacking something for your needs. If so that suggests that you need to consider the detail of the challenge in order to derive the most appropriate solution. Grant
In addition to what Grant pointed out, what version of Monarch are you using and are you using Monarch Classic or Data prep studio?
Good point Chris.
I had meant to ask that too but completely forgot to write it in!
Unfortunately Monarch does not have a function which would return total number of columns. To get around that I would suggest the following workaround:
I am assume your file is delimited, and you know total number of columns that a file could have. for example one file could have 10 columns and another file could have 15 columns, but most columns a file could have is 30.
Create a file and name it 1.csv. Add 30 commas (assume delimited character is comma) in 1.csv file. This file will be your template.
Launch Monarch classic, open database, select 1.csv and a file with data. After you configure import database field, and view data in the table view, there will be one bank row, which you can filter it out, and other rows with data. Create a calculated field and concatenate column 2 thru 30. since some of the columns from 1.csv will be null, when you concatenate columns there will be no values on the merged column.
Hope that helps
Regards
Mo
Join us for a community conversation on how High-Performance Computing (HPC) and Simcenter PSIM work together to meet the increasing demands of modern power electronics simulation. During this one-hour technical session, you'll discover how leveraging HPC can speed up simulations, improve scalability, and empower engineers…
Join us for a community conversation on accelerating your motor simulation workflow with Simcenter Simlab. In this beginner-friendly session, we'll introduce the platform's automated model-building capabilities and show how easy it is to set up your first electric motor analysis. You'll see the basic steps of geometry…
Join us for a Community Conversation where we'll discuss practical approaches to analyzing complex electromagnetic models using hybrid solver techniques. This session will provide a general overview of how different computational methods can be combined within a single simulation to address models containing varied…