You can translate the question and the replies:

Interpolation Variable using a formula - Julian calendar date

I have a data source which requres a dynanmic file name to be reference using a Julian date - last two digits of the year and the current day number. So 2022-04-04 would be 22094. Is there an easy way to include this value as part of the interpolation variable? I am not sure of any easy way to join this in view another view since it is being created dynamically. This is the current data source URL with the variable:{date}.ZIP I need that 22094 to be calculated (I can do this with date functions) but not sure how to incoroporate it into the datasource/views.
05-04-2022 12:01:37 -0400

1 Answer

Hi, Yes, you could pass an interpolation variable using a formula to obtain the filename dynamically. For instance, to read a file with a dynamic filename located at a remote location, you could do the following: * Create the required data source based on your file type and select **HTTP client** as the data route while configuring the data source. To pass the file name dynamically, you can use the interpolation variable in the file path URL as follows: `{fileparam}.zip` * Here @fileparam is the interpolation variable which means that the string @{fileparam} will be replaced at runtime by the value of the variable. You can refer to the section [Paths and Other Values with Interpolation Variables]( of the Virtual DataPort Administration Guide for more information on interpolation variable in the file path. * Now, you must pass a sample value to the field fileparam(interpolation variable) to create the base view. * After creating a base view, you can pass the filenames dynamically in the where clause to query the base view. To calculate the JULIAN date, you could use the [DateTime]( and [Text]( functions such as GETDAYOFYEAR, GETYEAR, SUBSTR, CONCAT, etc in the where clause. Hope this helps!
Denodo Team
06-04-2022 09:07:18 -0400
You must sign in to add an answer. If you do not have an account, you can register here