# Can we import text and excel file in Dynatrace query

**URL:** <https://community.dynatrace.com/t/can-we-import-text-and-excel-file-in-dynatrace-query/55878>\
**Category:** DQL\
**Created:** [May 12, 2026, 9:02am UTC](https://community.dynatrace.com/t/can-we-import-text-and-excel-file-in-dynatrace-query/55878 "2026-05-12T09:02:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kumarv14](https://avatars.discourse-cdn.com/v4/letter/k/edb3f5/32.png) [@kumarv14](https://community.dynatrace.com/u/kumarv14)\
**Post date:** [May 12, 2026, 9:02am UTC](https://community.dynatrace.com/t/can-we-import-text-and-excel-file-in-dynatrace-query/55878/1 "2026-05-12T09:02:55Z")

</div>

Hello all/&nbsp;[@krzysztof\_hoja](https://community.dynatrace.com/user/25373)

Could you please advise on how to import a **TXT or XLS file into Dynatrace** so that it can be used within a query? Specifically, I would like to read IMSI values from the file and use them dynamically within the query, such that each IMSI is processed one by one, and the corresponding results are generated and exported into an output file.

fetch logs, scanLimitGBytes:-1  
| filter dt.system.bucket==“custom\_digital\_” and index==“\_db”  
| filter Market==“IN” and IMSI==“20xxx”

|fields timestamp, AuditMessage,TransactionType

IMSI details

3xx4490  
7xx6595  
2416xx  
36334  
454xx

Thanks in advance !!!

---

<div class="post-metadata">

**Author:** ![Tommaso\_Fin](https://avatars.discourse-cdn.com/v4/letter/t/f475e1/32.png) [@Tommaso\_Fin](https://community.dynatrace.com/u/Tommaso_Fin)\
**Post date:** [May 12, 2026, 9:44am UTC](https://community.dynatrace.com/t/can-we-import-text-and-excel-file-in-dynatrace-query/55878/2 "2026-05-12T09:44:00Z")

</div>

Hi, did you checked lookup tables?

[Lookup data in Grail — Dynatrace Docs](https://docs.dynatrace.com/docs/platform/grail/lookup-data)

---

<div class="post-metadata">

**Author:** ![MaximilianoML](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/maximilianoml/32/25038_2.png) [@MaximilianoML](https://community.dynatrace.com/u/MaximilianoML)\
**Post date:** [May 12, 2026, 9:51am UTC](https://community.dynatrace.com/t/can-we-import-text-and-excel-file-in-dynatrace-query/55878/3 "2026-05-12T09:51:50Z")

</div>

Hello [@kumarv14](https://community.dynatrace.com/user/99064)&nbsp;,

Yes, this can be handled by storing the IMSI list as [**lookup data in Grail**](https://docs.dynatrace.com/docs/platform/grail/lookup-data), and then using that lookup table inside your DQL query.

In this case, I would not try to loop through the IMSIs one by one manually. A cleaner approach is to upload the values as a lookup table and then correlate them with your logs in a single query.

**Example IMSI file:**

```auto
IMSI
3xx4490
7xx6595
2416xx
36334
454xx

```

The file should preferably be prepared as **CSV**. If the source is an Excel file, convert it to CSV first and then upload it as lookup data.

**Example lookup path:**

```auto
/lookups/imsi_list

```

**Example DQL:**

```auto
load "/lookups/imsi_list"
| dedup IMSI
| join [
    fetch logs, scanLimitGBytes:-1
    | filter dt.system.bucket == "custom_digital_"
    | filter index == "_db"
    | filter Market == "IN"
    | fields timestamp, IMSI, AuditMessage, TransactionType
], on:{IMSI}
| fields
    timestamp = right.timestamp,
    IMSI,
    AuditMessage = right.AuditMessage,
    TransactionType = right.TransactionType

```

This will compare the IMSI values from the uploaded lookup table with the IMSI field in the logs, and return the corresponding matching records.

Once the query returns the expected results, the output can be exported from the table view as a CSV file.

One important detail: if values such as **3xx4490** or **7xx6595** are only anonymized examples, then the query above is appropriate. However, if the **x** characters are meant to behave as wildcards, then an exact join will not match them, and a pattern-matching approach would be needed instead.

I hope it helps you&nbsp;😃

---

<div class="post-metadata">

**Author:** ![MaximilianoML](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/maximilianoml/32/25038_2.png) [@MaximilianoML](https://community.dynatrace.com/u/MaximilianoML)\
**Post date:** [May 12, 2026, 9:52am UTC](https://community.dynatrace.com/t/can-we-import-text-and-excel-file-in-dynatrace-query/55878/4 "2026-05-12T09:52:39Z")

</div>

Vote up&nbsp;[@Tommaso\_Fin](https://community.dynatrace.com/user/3393)&nbsp;😁
