I need to create an on demand task to load data for say one month, with date increasing automatically by 1 everytime, till it reaches the month end date.
The data of next date depends on the previous data, so i cant't give the date range and run them altogather. It should load for next date only when previous date data is loaded.
EG: starting from 1 april, it should load dat for 1 april, then automatically increment the date by 1, load data for 2 april, and so on.
Someone please help, how this can be done.
If possible, I would prefer to load data in a single session run, instead of running it multiple times.
You can use a mapping variable to keep track of the current date. Initialize the mapping variable with the beginning date using parameter file. In your mapping set the variable to the next day using the SETVARIABLE function. So, when you rerun the mapping the new value of the date will be used.
However, you have to run the mapping multiple times, which you can do using a shell/batch script.
Related
I am new to Power Automate flows. I was tasked to create a Unique Sample ID based on parameters from a SharePoint list, when an entry is created. I have created a SharePoint list, whose function is to hold the increment variable, which is my counter. The current flow increments this counter variable, whenever an item is created in the main SharePoint.
The Sample ID is suppose to reset every year based on the logged date of the incident, which is different than the stored date. For example, 2020SPI1, 2020SPI2, and 2021SPI1, 2021SPI2. I am trying to get an idea on how to do this.
I do not want a flow that resets the counter every year, since the stored date of the entry can be different from the date that the incident occurred.
In Order to make your format like 2020SPI1
Step 1: Initialize a vairable named as PatternId
Step 2: Set Variable. You can use string concat function in value of variable as following
concat(formatDateTime(utcNow(),'yyyy'),'SPI',items('Counter')
First argument here will produce current year: 2020.
Second argument is a static string: SPI.
Third your counter value from the list holding incremented number.
Then finally you can use PatternId to updated the id in your list column. Hope this can help you out.
I am attempting to create a spreadsheet with a lot of data captured in it. The two requirements I have to meet are 1) group jobs/parts with the same PROJECT #, and 2 sort by JOB START DATE. I thought PivotTables were the best way to do so, but I keep running into a brick wall. I'm either unable to group by Project # (most likely because they are a mixture of numbers and text, this cannot be changed), or I'm unable to sort by Job Start Date.
I've tried moving Project # and Job Start Date from Rows to Values, as well as changing the order they're displayed in (Job Start Date before Project # and vice versa).
If grouped and sorted correctly, the records should show the grouped PROJECT # with the earliest start date first, then the next group with the next start date, etc.
An example would be:
>2074, 68506, BUC10626, 3/4/19
>>2074, 68568, AUC15393, 3/4/19
>>2074, 68570, AUC14509, 5/30/19
>2552, 69920, 99163786, 4/1/19
>>2552, 71066, H695359, 6/5/19
>1166, 71527, 5450926, 5/16/19
>2497, 71138, 2436-923, 6/11/19
>>2497, 73445, H646427, 7/24/19
>2704, 72682, AUC11771, 6/24/19
Pivot tables build a hierarchy. If you have a cascade of Project > Job > Part > Date, then you can only sort by date within the container of the previous level, i.e. Part.
If you have more than one part in the hierarchy, then different dates will show up sorted inside that part, e.g.
ProjectA
JobA
Part A
January 'these rows are
February 'sorted by
March 'date
Part B
August
September
Part C
March
April
If you want the projects sorted by date, then you need to have the date column before the project column.
I'm trying to design a Microsoft Flow, which will create a outlook calendar event entry based on information in a SharePoint-online list.
The list will contain a value for a DueDate its a column of type Date, not including time.
I want to be able to create a outlook calendar entry on the date based off the duedate column. The calendar entry form in flow allows via dynamic content to add dates that also include time, however date columns not containing time cannot be added that way.
Is there a workaround to this, some expression that would allow me to fetch values from columns more freely and then possible append a time to it
I have tried converting the column in sharepoint to a Date with Time column and that workaround worked, however its not what I'm looking for. Id like to know how to be able to work around this because I don't necessarily want my column as a date-time column which can cause problems later on.
I have tried this expression:
formatDateTime(concat(item()?['DATE'], '08:00')'yyyy-MM-ddThh:mm:ss')
But I know this is wrong and it doesn't work. I'm simply not sure how to do it.
https://puu.sh/Df5ni/05cb882b23.png
I want the flow to add a calendar entry based off the due date column which i can append my own time to like the start of the day and last til the afternoon.
Actual results are I don't seem to be able to use a date column, just a date-time column for start and end times of the event, date column without time doesnt appear in the dynamic content list.
If there is some way to manually fetch values instead of using the dynamic content that is very powerful and can then possibly be converted to the right format using additional code.
Date column name in my list is date_without_time of type Date (Add time set to NO):
New element:
Function used in Create event (V2) action:
formatDateTime(triggerBody()?['date_without_time'],'yyyy-MM-ddT09:35')
Result:
Calendar:
I need to create a SSIS package that would extract data from an Excel source and load it into a SQL Server Destination.
The Excel file name would have a date, typically the file name would look like emp_20110909.xls where 11 is the Month, 09 is the Day and 09 is the Year. Now I want to capture this date and in the destination table add another column named "Extracted_Date" and populate the captured date for all the records extracted from this excel.
Can anyone tell me how to do that process?
Excel as a data source offers no explicit functionality for this whereas the Flat File Source does. I blogged about this under What is the name of a file
What you're looking to do is have a Foreach File Enumerator look in a folder for your Excel file(s). Assign the value of the currently found file to a variable like #[User::CurrentFileName]. That would look something like C:\ssisdata\mySource\Input\emp_110909.xls
You would update the Excel Connection Manager to have an expression on the ExcelFilePath property so now as the value of #[User::CurrentFileName] changes, so does the actual referenced file. You can find plenty of references to using the foreach enumerator on the web or search my answers
The last bit you need is to parse the value of CurrentFileName to find the year
(11), month (09) and day (09) elements - or maybe you want it as one big value (110909). For this, I would create 4 variables: FileDate, FileYear, FileMonth, FileDay all as string. Yes, they're numbers but for our usage, treating them as string is going to be easier.
FileDate will correspond to everything between the underscore following emp up until the period of xls. We're going to use the Expression language of SSIS to do this and the particular elements will be SUBSTRING, FINDSTRING and LEN
SUBSTRING(#[User::CurrentFileName], FINDSTRING(#[User::CurrentFileName], "emp_", 1) + LEN("emp_"), 6)
Here, I was lazy and just "knew" the length was 6 and hardcoded as such. In the event that someone gives us a emp_20110909.xls this will fail. The preceding expression would be modified by finding the position of the period and then calculating the length from the emp_ position.
Now that we know FileDate, we can use SUBSTRING to slice out the first 2 elements for year, next 2 for month and final two for day.
You can then inject those values into your Data Flow via a Derived Task or push into an audit table via Execute SQL Task.
I have a formula that I've been trying to setup to read a data value from the 4th row of a column IF the current time is less than a certain value, ELSE pull from the 2nd row of the column.
=IF($Z$16<5,'SOME TEXT'!N4,'SOME TEXT'!N2)
Formula for Current Time (Hour) in Cell $Z$16:
=TEXT(NOW(),"H")
The purpose of this IF statement is to account for using old temperature data until 5am, when the new data comes in. I thought that I had this formula set up but, for the past few mornings, it has not worked.
Use
=IF(<time-of-the-day><TIME(5,0,0),'SOME TEXT'!N4,'SOME TEXT'!N2)
You would replace <time-of-the-day> by any of
(NOW()-TODAY())
(NOW()-INT(NOW()))
TIME(HOUR(NOW()),MINUTE(NOW()),SECOND(NOW()))
TIMEVALUE(TEXT(NOW(),"H:M:S"))
There might be better options to isolate the current time of the day.