Add source file name to output table
Hi, I am trying to pull data from Azure blob to On Premises SQL Database. I have emp file that have three columns (Id, FirstName, LastName) and SQL table has five columns (Id, Firstname, LastName, SourceFileName, Lastmodifieddatetime). Is there any way to
map SourceFileName and Lastmodifieddatetime in the Azure Data Factory.
Thanks,
Gaurav
OK, got it. The file name iws not updated until the file is closed and opened.
I will add the variableto the topics in question.
Similar Messages
-
How do I map the source file name to a target table?
I am mapping a source fixed length flat file to oracle target tables. One of the tables is a parent transaction table that stores the date, record number, status, etc. and the file name of the source flat file. The file name will change daily because the date is part of the naming convention. Is there an easy way to determine the source file name and map it?
One option a co-worker is working on is writing a pre-mapping stored procedure. It would insert the file name into a table prior to the mapping. But I was hoping for a cleaner solution.
Thanks!Hi
Use extarnel table to load the data from the file into the table.
Create a procedure which changes the external table definition as the filename chnages.
Use this proceudre in the mapping as a premapping process.
Ott Karesz
http://www.trendo-kft.hu -
Imported source file name changed for the external table
Hi,
I have external table from flat file. Now the source file name is changed. I can change the file location to point to the new file name, but I can't update the source for the flat file property(as seen under flat file properties,structure tab. the column "Sampled From"). Is there way to have this update without having to import the file using the new file name again?In the Files section in the object navigator find the flat file you want to change the source of.
Double click on the actual file, and on the General tab change the old file name to the new one.
The fact that it has been sampled from a different file should not 'disturb' the working of the external table.
However, if the structure of the new file is different I'd suggest to resample.
Good luck, Patrick -
Is it possbile to add the file name variable to topics after they are created without having to manually insert the variable?
Upon inserting the variable, format is thus:
<variable name=file x-format=default x-value=0001.htm>0001.htm</variable>
The x-value and text are plugged in automagically upon insertion.
Is there a simple variable code that will pulls these values in?
My ultimate need is to be able to print topics and include the file name. I could use Title just as well.
A report would work, if the report included the topic text.OK, got it. The file name iws not updated until the file is closed and opened.
I will add the variableto the topics in question. -
Get source file name in the structure itself or in the payload
Hi everyone,
I have a task regarding mapping
In my structure , i defined a field for Filename . What I need is, what ever source file name am sending, that should be mapped into this filed.
If am sending inputfile.txt.
My output file should appear like this,
<?xml version="1.0"?>
<message id=u201DmessageIDu201D>
<header>
<filename>D:\\inputfile.txt</filename>
</header>
<body>
FileContent
</body>
</message>
Any help would be appreciated. Do I need to create any UDF. If So please provide.
Regards,
VarunHi Varun,
are u using the same UDF that I replied. also note that the variable key should be declared only once.
Use this without changing any thing. It works for me...
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String ourSourceFileName = conf.get(key);
key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","Directory");
String dir = conf.get(key);
return dir+'/'+ourSourceFileName;
Also let us know where do you het this error..
Thanks
SaNv... -
RH10 variable and build tag source file names
I'm using RH10 and outputting to WebHelp. My company requires that I archive project source files to our CVS via Eclipse. I am not using RoboSource_Control and must use the company's development resources for archiving.
Since archiving the initial project, I have been uploading only source files with modified dates.
However, I have discovered that the files I thought were storing user variables and build tags are not the correct files to archive. Since I am uploading all files with a newer date and that's not working, I need to know the user variable source file name and the build tag source file name that stores the currently defined variables and build tags.
I have already tried the WebHelp forum and was directed to this forum to pose the question because I'm looking for source file information instead of output file information.
Thanks for your help!
karenYes, Eclipse does work that way. However, we do not use our development directory as the local Eclipse repository. I need to move changed files to the local repository (stores all source files in the project) so that Eclipse can upload changes to the server. Yes, this is planned redundancy.
That said, it is not acceptable to spend the time copying all files in the large projects from the work folder to the local repository. I simply need to know which individual files to copy that include the currently defined variables and build tags. Note, we do not copy the SSL folder output files to our local source file repository, or other associated reference files that are not actually project source files.
Can you find someone who knows which files I need?
Thanks,
karen -
File-File - Need to extract data from source file name???
Hello Experts,
I have a unique situation. In my file to file scenario, the source file name is of the format XYZ_yymmddHHMM.dat. there is field in the target file which has to filled with the date that is there in the file name of the source file (yymmdd). How can this be achieved? Normally we do the other way round using vaiable substitution where we can name a file depending on the value in any of the target field structure.
Please help.
Regards,
YashHi,
please prepare the udf with the following code.
i mean, dynamic configuration concept.
where u get the file name, then use substring function to capture date from right side.
//write your code here
// getFileName User Defined Function
// function to create name of output file
String filename;
filename = strFile;
try {
// initialize DynamicConfiguration for create file with given name
DynamicConfiguration conf = (DynamicConfiguration) container
.getTransformationParameters()
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/File", "FileName");
//create file with the specified name
conf.put(key, filename);
} catch (Exception ex) {
return filename;
warm regards
mahesh. -
** How to get Source File Name thru XSLT Mapping
Hi friends,
We require source file name after message processing (SXMB_MONI) in the output structure. We understad from Forums and blog 2664, this is possible thru UDF - DynamicConfiguration class. This UDF will work if we use message mapping. But, in our case we are using XSLT mapping. So, how do we call the same from Java Pacakage ? (Imported Archives). For writing java class separately, what are the changes to be made in the program?
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String ourSourceFileName = conf.get(key);
return ourSourceFileName;
Kindly reply, friends.
Kind Regards,
Jeg P.Hi,
This is the example in this similar manner u have to call the method in which u have to write the code for picking the source file name.
<name>
<xsl:if test="function-available('javamap:concat')">
<xsl:value-of select="javamap:concat($first, $last, $inputparam)"/>
</xsl:if>
</name>
for reference check the Link,
http://help.sap.com/saphelp_nw04s/helpdata/en/73/f61eea1741453eb8f794e150067930/frameset.htm
Regards,
Phani -
Pdf portfolio source file name and date in file details
Is it possible to import the source file name and extension as well as the source file created date in the portfolio file details? Need to document source to portfolio in working with 3rd parties that will only have the original source. Need to document what was converted into pdf as not all files in a directory will successfully convert to pdf. Sometimes need to convert 100's of files. Manual entry is inefficient. the file names and modified dates are displayed on the Combine Files dialog. is there a way to capture the detail on that page?
I don't need the detail of when the pdf was added to the portfolio. I
need know which dwg or jpg or word file was converted and the original
created date of that file for control of information.
That is impossible; sorry. For some *very specific* types of conversion to PDF the pdfx:SourceModified XMP tag will be set to show the last-modification date of the source file (for example DOCX files converted using MS Word), but there will never be a human-readable record of the source filename or its creation date unless you have manually added them as document XMP properties after conversion (this is what the "Custom Properties" dialog is for). To embed source data automatically would raise no end of privacy and security problems for customers, who most certainly do NOT want their recipients seeing details of internal documents.
Without writing a plugin there's no access to the internal workflow of the Combine Files dialog, so you cannot use a script to read the names and dates of the files *before* conversion and store them automatically in the new PDF Portfolio's Fields array. -
bool exists = false;
TreeNode newNodeParsed = null;
TreeNode rootNode = treeViewMS1.Nodes[0];
TreeNode nextNode = rootNode;
string f = Path.GetFileName(txtUploadFile.Text);
TreeNode subnode = new TreeNode(txtDir.Text);
TreeNode filename = new TreeNode(f);
if (!txtDir.Text.Contains("/"))
foreach (TreeNode node in rootNode.Nodes)
if (node.Text == txtDir.Text)
exists = true;
break;
if (exists == true)
subnode.Nodes.Add(f);
else
rootNode.Nodes.Add(subnode);
subnode.Nodes.Add(f);
The rootNode is the root directory in the treeView1
subnode is a node inside the root. For example the subnode name is manuelisback
I'm checking if the subnode exist i want to add the file for example (lightning1.jpg) to be under subnode.
If the subnode is not existing add the subnode to the root and then add the file name lightning1.jpg under the subnode.
But the file name is never added under the subnode:
I added manualy the lightning1.jpg under test.
But the lightning1.jpg also should be added to be under manuelisback. There should be two lightning1.jpg here.
One under manuelisback and one under test. The one under test i added manualy from my ftp server.
But the one i want to be under manuelisback i'm trying to add from my program and it dosen't add it to there.
And when i'm using a breakpoint i see on subnode the text manuelisback and i see on f the text lightning1.jpgIf I understand your question correctly, you might want to try changing:
if (!txtDir.Text.Contains("/"))
foreach (TreeNode node in rootNode.Nodes)
if (node.Text == txtDir.Text)
exists = true;
break;
if (exists == true)
subnode.Nodes.Add(f);
else
rootNode.Nodes.Add(subnode);
subnode.Nodes.Add(f);
to something like:
if (!txtDir.Text.Contains("/"))
foreach (TreeNode node in rootNode.Nodes)
if (node.Text == txtDir.Text)
subnode = node;
exists = true;
break;
if (exists == true)
subnode.Nodes.Add(f);
else
rootNode.Nodes.Add(subnode);
subnode.Nodes.Add(f);
rootNode.Nodes.Add(f);
It would be greatly appreciated if you would mark any helpful entries as helpful and if the entry answers your question, please mark it with the Answer link. -
Dynamic File Name depending on the Source File name
Hi Experts,
I have a problem like Dynamic File name depending on the Source File Name. I will explain with example as follwos
Source File name Targer Folder/Filename
NK01.VR59.L2007030 VR59/Rec.l200
NK01.VR71.L2017030 VR71/Rec.l201
NK01.VR77.L2027030 VR77/Rec.l202
See above the exaple, Depending on the Source file name, I am deciding where i need to place my file and what name i need to name it.
So please suggest me the solution and How can i do this with a single communication channel ? Do i need to create multiple CC for each folder??
Points will be rewarded for Valuable anwer.
Thanks in Advance,
Best Regads,
VijayHi VIjay,
Thanks for quick reply. But i am getting error in End to End Scenarios only. If i remove the Return " " statement from the UDF, while activating it is showing the error saying like missing return statement. I also mapped to the top most node to this UDF.
I am getting the following error in End to End error Scenarios:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Request Message Mapping
-->
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
<SAP:Category>Application</SAP:Category>
<SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
<SAP:P1>com/sap/xi/tf/_MM_Target_File_determined_</SAP:P1>
<SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException</SAP:P2>
<SAP:P3>Fatal Error: com.sap.engine.lib.xml.parser.Parser~</SAP:P3>
<SAP:P4 />
<SAP:AdditionalText />
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack>During the application mapping com/sap/xi/tf/_MM_Target_File_determined_ a com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown: Fatal Error: com.sap.engine.lib.xml.parser.Parser~</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error> -
Load Source File Names into Recordset Object
Hi,
I have a folder with abc.txt, xyz.txt, pqr.txt etc files.
My requirement is to load all the file names into a Record Set which I need to use in data flow. I think I need to use For each loop container with Enumerator as 'Foreach File Enumerator' and in the variable mappings I have added a variable name
to get the file name. But I have stuck how to add these file names to a Record Set target. Please help me.
Thanks.Hi Amaya14,
Go these this link Click Here
Thanks -
File Sender adapter - source file name - weird
Hi all,
We have a sender file adapter polling an ftp location. The Dynamic config has been enabled to get the source file name.
The actual file name is - "hrmd.xml", but in the dynamic configuration node, in sxmb_moni, the fileName is shown as ./hrmd.xml.
This does not occur with any other file sender adapter comm channels polling ftp locations.
I guess this has something to do with the ftp server. Did anyone face this issue?the fileName is shown as ./hrmd.xml
The file name surely cant have a / in it....such characters are not allowed.
is there any way we can change the fileName message attribute once the file is picked up
Create a UDF for Dynamic Configuration and change the name as per your requirement (in XI)....the source file may be having proper format for name and i assume that you have to change it for receiver file name -
Getting the Source File name Info into Target Message
Hi all,
I want to get the Source file name Info into Target message of one of the fields.
i followed Michal BLOG /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
Requirement :
1) I am able to get the Target file name as same as the source file name when i check the ASMA in Sender & Receiver Adapter , with out any UDF...............this thing is OK
2) I took One field extra in the target structure Like "FileName" & I mapped it Like
Constant(" " )--UDF-----FileName
I Checked the Option ASMA in Both Sender & Receiver Adapters
Here iam getting the Target File name as same as Source file name + Source File name Info in the Target Field " FileName".
I Dont want to get the Target File name as same as Source file name. I want like Out.xml as Target file name.
If i de-select the Option ASMA in Adapters means it is showing " null" value in the target field "FileName".
Please Provide the Solution for this
Regards
BopannaHi All,
Iam able to do this by checking the Option ASMA in only sender adapter itself
Regards
Bopanna -
Need to genereate Target file name same as Source File Name thru Local J2SE
Hi Everyone,
I want to genereate Target file name exactly same as Source File Name. I know how to handle this in Central Adapter Engine(Sender & Receiver Communication Channel).
But I need to do this in Local J2SE adpater engine.
Please help me in this regard.
Thanks & Regards,
NagarajuU can use the parameter to save the filename in the message header
file.messageAttributes=<name,directory>
This is similar "Adapter-Specific Message Attributes" concept.
http://help.sap.com/saphelp_nw04/helpdata/en/6f/246b3de666930fe10000000a114084/frameset.htm
Regards,
Prateek
Maybe you are looking for
-
Error in VF03 while printing "Output could not be issued"?
Hi all, getting error while printing invoice VF03. Error is "Output could not be issued". Print privew is coming fine in both side either Smartform or VF03. If I try to print, then system giving the message is Output could not be issued. How to resol
-
How to sort photos in albums by date in iPhoto '11
For some reason that I have yet to divine, iphoto 11 jumbles the order of photos in any album I create. For example, I have an album called 'Family', and rather than display the photos by the date they were taken, it jumbles them into a mish mash of
-
Printing not working via "Faces" view in Aperture 3
When I select a photo via the "Faces" view and then attempt to print, Aperture doesn't present a Print window- nothing happens. When though I select the same pic (or any other) via the "Split Pane" view, Printing works fine. I'm running A3.2.3 on L
-
I bought an apple tv2 and hooked it up through an HDMI to component converter then to my HDTV as it does not have an HDMI connection. When I turned it on, I got the start up screen x3. Three of the start up screen all across the display. Is there any
-
How do I find the rented movie that should have downloaded.... but it never did and now they want me to pay again to rent it???