Can we append timestamp in the format 'mmddyyyy' to business objects reports name generated by scheduler. I know we can append file extension using '%EXT%'. I am looking for something similar.
Thanks for any help
I figured out this one:
I have to pass : RPT_NAME_%SI_STARTTIME%.%EXT%
This will generate only in yyyy-MM-dd-hh-mm-ss.fileextension format though
The format of the returned date is defined by your default locale. This may be examined using the Regional Settings in the control panel.
See this
Related
I am trying to save the date/time in Firebase in timestamp format. I have referred answers from below posts.
How to get current timestamp of firebase server in milliseconds?
https://www.reddit.com/r/Firebase/comments/n32ys2/how_can_i_save_the_values_in_the_datepicker_as/
I have tried saving data by adding different date formats in Body but it is ultimately getting added as a string or number depending upon string or timestamp.
Does anyone have idea how to send the date to Firestore using JSON or anything using which i can directly add it to Appsmith app?
As of now Appsmith supports adding a server timestamp to any field in Firestore. Server timestamp is the timestamp provided by the Firestore server when that particular query was executed.
e.g. if there is entry like
{
id : {name: foo, lastUpdated: ts}
}
then the lastUpdated field could be updated with the last update timestamp via setting the Timestamp Value Path to ["id.lastUpdated"]
Please checkout the video here and comment by user tazmaniax to understand more: https://github.com/appsmithorg/appsmith/pull/3693
Reference:
https://firebase.google.com/docs/reference/android/com/google/firebase/firestore/FieldValue#serverTimestamp()
Appsmith's documentation for this is under progress and will be available on the Appsmith documentation site soon. Apologies for not putting it over there sooner.
For any other query or help please join Appsmith's discord channel
I have the impression that there is an error with the Firestore and Appsmith connector.
I have tried different combinations and if you do not send a string, int or bool in the json request, errors are generated.
However Appsmith added an additional field for handling timestamp (now)
I have a requirement where the output file needs to be saved(dynamically) with the naming convention as FileName_YYY-MM-DD_FileNumber where file number is the sequence number. For example:-
ABC_2009-01-01_001
ABC_2009-01-01_002
ABC_2009-01-01_003 and so on
I am able to get the name part and date part using expression in .TXT connection but unable to get the sequence number part. I would appreciate if anyone could help me out with the solution.
Thanks in advance!
Use a package variable that starts with "1" and add one to it for each new file.
EDIT: To populate the variable, one way is to use a script task that opens a filesystemobject and gets all the file names in the folder, parses them and figures out what is the highest sequence number. Then just add one to that number and set the value of the variable to that.
And no, I don't have any code handy that does that. You'll need to write it yourself.
I'm doing my first ABAP job and I don't have much experience so I need a little help.
What I want to do to create a batch job that runs every morning at a specific time, fetches data from different tables and exports it as a csv file. To create that batch job I can use transaction code SM36 or SM37.
But I need some help how to fetch the data?
Has anyone an example code that I can use or take a look at?
TheG is right, it sounds like you're trying to learn ABAP from scratch with no guidance. That's difficult but here are some basics:
There are three parts to this:
1. create a program
2. generate a file
3. schedule the job
For 1,
If you go to SE38, you can create a new report. You'll have to check with your colleagues about the namespace, but usually you just start the program with Z (which puts it in the 'customer' namespace).
In the entry box of SE38, you can type DEMO to pull up lots of sap-provided demo reports. The names usually give you a hint about what they demo and you can probably find one that mentions creating a file.
Once you create your own report through SE38 by typing in the name and hitting enter, you can use SELECT...INTO TABLE or SELECT ... ENDSELECT to query the database tables. Highlight select and click the blue i icon to pull up SAP's internal documentation.
At it's most basic, you can use the WRITE statement to print out the rows and columns of your data.
Once you have your report running, then scheduling it with SM36 will be more self explanatory.
This is very basic ABAP reporting program stuff. Making the report run as a background/batch job is the least of the concerns. Let us help you walk through this.
-> Have you done any reporting programming before ?
-> Do you have the list of tables from which you want the data and do you know how they are linked ?
-> Do you know how often this report would be run and what would be the selection criteria required ?
-> Did you check with the functional team whether you want 'delta pull' or 'full pull' every time you run the report ?
-> Do you have the file share where you want to output the file ? Is it on the presentation server or the application server ? If not presentation server can you reason out why not ?
-> Did you confirm on the file name and how it should look ?
-> Do you know how to generate a CSV file ? If this is a 'production requirement' ,are there reusable frameworks for handling file operations in your company ?
-> Do you have the final format of how the CSV file would look ?
-> Did you verify with the functional team whether they want the output data in external format for some fields ?
-> Did you check if there are date fields in your output and what format you want it to be for consistency ?
If you are familiar with ABAP a little bit, explore answers for above, write a report and getting it running in dialog mode. Then revert back to us and we will help you on how to run it as a batch job.
I want to log my exceptions in a file. What will be the name of the file?
Error-ddmmyyyy.log
Log-ddmmyyyy.err
Log-ddmmyyyy.txt
or anything else?
If date is important, I would use yyyymmdd format: this is easier to get a sorted list. I would add hhmmss if relevant.
.log suffix is nice for me.
I would add the name of the command issuing exceptions as a prefix of the logfile.
Something like: myCommand-20100315-114235.log
There are many ways you can name your log files, you have to consider several factors:
Is your file generated by a special server or application in a group? Then you should add the name of the server to know where it does come from.
Example:
Server1.log
In the log file there could be many levels of logging, if you want you can configure different files for different levels.
Example
Server1.info.log
Server1.err.log
You should add a date if your application runs for many days or if you want to keep track of errors for future reference, add it at the start of the name in yyyyMMdd format on windows or linux so they will be sorted by date automatically in command line commands or add it at the end if you want them more organized:
Server1.info.log.20100315 (Linux)
Server1.info.20100315.log (Win)
You can try with different combinations, it all depends on what sorting style and archiving style you want to achieve.
When developing a Data Flow I don't always want to output the results to a destination - but I would like to see the data.
Is there a way to attach a Data viewer to an output without having to have a destination?
The file and raw destination have limitations on the data type they accept - and I don't want to attach conversions just to test/build code.
Is there some kind of output to null ? i could then get a data view on the result set
There is a (free) custom "trash" destination available from a third party:
http://www.sqlis.com/post/Trash-Destination-Adapter.aspx
I usually use Export column transform - if left with default configuration, it does nothing, so it is equivalent to the custom "Trash" destination mentioned by Ed, but you don't have to install anything.
When debugging and wanting to view the data in the buffer, I usually throw in a Union All and connect it below the component who's output I want to see. Then add a Data Viewer on the connector and voila, there it is!
There isn't really. You can use a RecordSet Destination, or a Row Count transform instead.