I'm trying to alias a stream to include the previo...
# troubleshooting
c
I'm trying to alias a stream to include the previous month/year in the name of the stream and am struggling to get an expression to work, is this something the stream maps supports or are expressions only available on the stream properties and not alias? The following fails as Meltano can't parse the yml block. If I wrap in quotes than my stream is named as the expression without an evaluation. Clearly I'm missing something, the below sample should name my stream MonthlyFeeExtract_Aug25
Copy code
stream_maps:
    stage-monthly_fee_details:
        __alias__: 'MonthlyFeeExtract_' + (datetime.datetime.now() - datetime.timedelta(months=1)).strftime('%b%y')
Thanks in advance
h
`simpleeval`'s default functions are available in both stream properties and alias, but the special functions are only available on the stream properties
so datetime is not available in the alias field
this would be pretty straightforward to implement, changing this line https://github.com/meltano/sdk/blob/c862d8d132f52afd765902d55fe0d50ab175a1c9/singer_sdk/mapper.py#L865 to
Copy code
expr_evaluator = simpleeval.EvalWithCompoundTypes(names=names, functions=self.functions)
👍 2
e