Rapidminer : how to named result from loop file - rapidminer

Sory if its basic question..
My process just like this :
how can i save the text file for each file, i use macro but failed. but when i use for add the attribute it's success. i just use rapidminer as my praprocess step. i wanna do other process with other tool i want to use.
extract macro name is "filename" and write as text
Thanks for help..

Related

How to Read CSV file using Power Automate?

I have added CSV file to SharePoint Documents library.
I needs to read that CSV file using Power Automate / Flow.
I have created Power Automate flow. Below is the screenshot fro the same.
Which CSV parser do i need to use for read data from file content action?
Can anyone help me for the same?
Thanks
If you want to retrieve the content of the CSV without a premium connector you could use an expression to convert the $content property of the Get File Content action into a string value. You can use the base64tostring function for this.
Below is an example
base64tostring(outputs('Get_file_content')?['body']['$content'])

SAS input json into HTML

Im creating an HTML file from SAS like the following
data _null_;
file './test.html';
put '<DOCTYPE html>';
put '<html>';
put '<script>'
put '</script>'
put '</html>'
The problem is that I need to take a SAS dataset, convert it to JSON format and insert it into the HTML file. The pseudo code is:
data _null_;
file './test.html';
put '<DOCTYPE html>';
put '<html>';
put '<script>';
sasDataFrame -> to Json
put 'console.log(sasDataFrame)';
put '</script>'
put '</html>'
I know that proc JSON allows me to convert SAS dataset to Json, but i don't know how to embed the string result into an HTML through this sort of put statement.
Anyone knows how to accomplish this?
Create the JSON file as a text file using PROC JSON or whatever method you want. Then write the contents of that file into your HTML file.
So let's assume you have pointed the fileref JSON to file with the JSON text in it.
Now first write the header information, then the contents of the file, then the trailing information.
With your simple example you could do it all in one data step. Just read the lines from the JSON text file and write them to the HTML file you are creating.
data _null_;
file './test.html';
if _n_=1 then put
'<DOCTYPE html>'
/ '<html>'
/ '<script>'
;
if eof then put
'</script>'
/ '</html>'
;
infile json end=eof;
input;
put _infile_;
run;
For more complex file generation you can use multiple data steps to construct the HTML file. Just use MOD option on the FILE statement to append text to an existing file instead of making a new file.
Streaming web content like this is an antipattern!!
Rather than fiddle around with put statements, why not serve your index.html through the web server, and send the data from SAS directly as a pure JSON payload?
Here's a repo we created that will let you talk to SAS from frontend: https://github.com/sasjs/adapter
And here's another one with a ready-made web app you can use as a starting point: https://github.com/sasjs/minimal-seed-app
Whilst plugging SASjs (an open source tool my team created) I'll also point out that by using this approach you can easily deploy and run your web app on Viya and Base SAS as well as SAS 9 BI. It'll also run much faster and be easier to maintain.

SSIS Reuse Dynamic Flat File Desitination Filename

I have an SSIS package that creates a text flat file from data in a database table. Everything works perfect except that I need to capture the dynamic filename for use in another process. I've searched everywhere but haven't found anything close to what I need other than using a ForEach Loop to loop through the directory the file will be stored in. I can't do that because there's too many things that could go wrong. I'm currently creating the dynamic filename through variables and it contains a datetime stamp.
Is there a way that I can capture the file name when the file is created in the data flow task so I can use it in another process within the control flow task?
Thank you in advance!
John

Pentaho Data Integration - Multiple CSV File Inputs

I've been using Pentaho Data Integration lately and currently I intend to use it to a project I'm in. The assist I'm looking for is the following:
There can be variable CSV file inputs in a folder
Is there a way to get all .csv files (the operator/ series of operators) using Pentaho?
After this step I believe what I have to do is pretty simple, as I only have to merge those files together.
Thanks
Use the Text File Input. It allows for folders using a regular expression and can handle csv files
Add the "Get File Names" step before the "CSV file input" step. When the CSV step has input, then a field appears in the configuration dialog allowing you to get the filename from the incoming stream.

Excel file name issue in send mail task using SSIS

I have a package which is creating a excel file 'ExcelName.xls' and storing in 'E:\Reporting\Delivered_Reports'. Now I have to attach this report using send mail task and send it to given mail id. To achieve this I have configured the send mail task and in Expression Builder, I have selected the below expression:
"E:\\Reporting\\Delivered_Reports\\ExcelName_"+
((DT_WSTR,4)Year(#[System::StartTime]))+
RIGHT("0"+((DT_WSTR,2)Month(#[System::StartTime])),2)+
RIGHT("0"+((DT_WSTR,2)Day(#[System::StartTime])),2)+".xls"
I need file name should be 'ExcelName_20150601' where suffix is the current date. But I recieve file which name is 'ExcelName', which is the origional file name. Can you tell me where I am wrong?
Thanks in advance
It sounds like you are editing the name of the excel file in the email, instead of using a file system task to actually rename the file prior to sending it. You can't rename the file using the send mail task, as far as I know.
Additionally, I would do the date to string conversion in a separate variable in order to make this easier to debug, or even put both values in variables to ease maintenance.
Create a variable "var_today" or something and put this code in it:
((DT_WSTR,4)Year(#[System::StartTime]))+
RIGHT("0"+((DT_WSTR,2)Month(#[System::StartTime])),2)+
RIGHT("0"+((DT_WSTR,2)Day(#[System::StartTime])),2)
Then your expression becomes:
"E:\\Reporting\\Delivered_Reports\\ExcelName_"+
#[User::var_date]+".xls"
Do the same for the root directory.
it is better to make the filename you wanted while you are generating from the package.
you cant change the name while sending and put your filename in a string variable instead of writing it directly.
#[User::File_Name]+#[User::date]+".xlsx"
something like this