Hello, in a process, i'd like to change the names of several files depending on the result of 2 queries. One query gets all the files we need to change the names of (without extension) and the other one gets an integer for each of theses files. I need the process to compare each filename with files of the first query and, when it matches, concatenate its name with '.' and the number corresponding. I tried to use a sqltoparameters or a variable but I didn't get the expected result.
What is the best way to do this ?
Thanks
Best Answer
A
Audric FREY
said
about 2 months ago
Hello,
It was solved in a support ticket.
Create 2 process, on main process with the tFileWait that will retrieve the file and an execute delivery (that will execute the delivery that will perform query and retrieve file name with bind link)
We pass the file name in a variable to this delivery with a bind link.
So for each file we will execute the delivery
In the second process ( call with the execute delivery ) we will execute a query to retrieve the file and pass it to a file move with a bind link
So, if I've understood your needs, you want to concatenate a filename from the first query with a sequence number from the second one ? The easy way would be to integrate all your data into the same database schema and manipulate it on only one query. It's difficult for me to give the best solution without more information... :)
After that, you may put a bind link and the action you want to use to change your filename (for instance Move File)
C
Claire Devoux
said
5 months ago
I want to concatenate a filename from the first query with a sequence number from the second one where the original filename matches the result from the first query. I have 10+ files to rename. I tried with all my data into the same table. I tried to use sql to parameters, variable and sqlOperation + publish my parameters with a script, none of them have worked. I also tried to rename with a script or Move File without any success. I don't know if the problem is getting my values or the test on the originals filenames or the way I try to use my variables or parameters or something else
R
Romain ALCARAZ
said
5 months ago
Hi Claire,
Could you share your queries (which you're trying to test), structures and an example of your data ? This will help us to understand a little better by contextualizing the requirements.
A
Audric FREY
said
about 2 months ago
Answer
Hello,
It was solved in a support ticket.
Create 2 process, on main process with the tFileWait that will retrieve the file and an execute delivery (that will execute the delivery that will perform query and retrieve file name with bind link)
We pass the file name in a variable to this delivery with a bind link.
So for each file we will execute the delivery
In the second process ( call with the execute delivery ) we will execute a query to retrieve the file and pass it to a file move with a bind link
Claire Devoux
Hello, in a process, i'd like to change the names of several files depending on the result of 2 queries. One query gets all the files we need to change the names of (without extension) and the other one gets an integer for each of theses files. I need the process to compare each filename with files of the first query and, when it matches, concatenate its name with '.' and the number corresponding. I tried to use a sqltoparameters or a variable but I didn't get the expected result.
What is the best way to do this ?
Thanks
Hello,
It was solved in a support ticket.
Create 2 process, on main process with the tFileWait that will retrieve the file and an execute delivery (that will execute the delivery that will perform query and retrieve file name with bind link)
We pass the file name in a variable to this delivery with a bind link.
So for each file we will execute the delivery
In the second process ( call with the execute delivery ) we will execute a query to retrieve the file and pass it to a file move with a bind link- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstRomain ALCARAZ
Hi Claire,
So, if I've understood your needs, you want to concatenate a filename from the first query with a sequence number from the second one ?
The easy way would be to integrate all your data into the same database schema and manipulate it on only one query.
It's difficult for me to give the best solution without more information... :)
After that, you may put a bind link and the action you want to use to change your filename (for instance Move File)
Claire Devoux
I want to concatenate a filename from the first query with a sequence number from the second one where the original filename matches the result from the first query. I have 10+ files to rename. I tried with all my data into the same table. I tried to use sql to parameters, variable and sqlOperation + publish my parameters with a script, none of them have worked. I also tried to rename with a script or Move File without any success. I don't know if the problem is getting my values or the test on the originals filenames or the way I try to use my variables or parameters or something else
Romain ALCARAZ
Hi Claire,
Could you share your queries (which you're trying to test), structures and an example of your data ? This will help us to understand a little better by contextualizing the requirements.
Audric FREY
Hello,
It was solved in a support ticket.
Create 2 process, on main process with the tFileWait that will retrieve the file and an execute delivery (that will execute the delivery that will perform query and retrieve file name with bind link)
We pass the file name in a variable to this delivery with a bind link.
So for each file we will execute the delivery
In the second process ( call with the execute delivery ) we will execute a query to retrieve the file and pass it to a file move with a bind link1 person likes this
-
File external resolver with encrypted value
-
Timeout on Mapping/Webservice call
-
UNIQUE TEMP TABLE NAMES
-
Previous step name from a sub-process of execute delivery
-
Dropping multiple tables at once in XDI
-
Freeze Designer and corrupted workspace
-
FileWait/Move/Copy: FileInclude with space
-
Loop excel files
-
Change SVN user in the Designer
-
How to Specify the JVM used by the Designer?
See all 64 topics