Need to ignore spaces in my set variable activity?

JH-AM 41 Reputation points
2021-01-29T08:32:28.017+00:00

I'm new to ADF, I have a column in an excel sheet with spaces in the name I need to set as variable for my parquet file. Changing the column name in the source file is not an option. Is there a way to ignore the spaces so i can run it without an error? My expression builder code in set variable activity: @activity('get_variable_from_excel').output.firstRow.my column name

Thanks in advance

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,977 questions
0 comments No comments
{count} votes

Accepted answer
  1. HarithaMaddi-MSFT 10,136 Reputation points
    2021-01-29T11:28:51.783+00:00

    Hi @JH-AM ,

    Welcome to Microsoft Q&A Platform. Thanks for posting the query.

    To specify special characters to Azure Data Factory, we can use [''] instead of . to read such elements. Example is as below.

    @activity('Lookup1').output.firstRow['test space']  
    

    Please let us know if this helps in resolving the issue. Let us know for further queries and we will be glad to assist.

    --

    • Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification.
    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.