# sqlFile file path wildcards?

**URL:** <https://forum.liquibase.org/t/sqlfile-file-path-wildcards/7181>\
**Category:** General Discussion\
**Created:** [August 12, 2022, 5:39pm UTC](https://forum.liquibase.org/t/sqlfile-file-path-wildcards/7181 "2022-08-12T17:39:08Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bprocket](https://avatars.discourse-cdn.com/v4/letter/b/e56c9b/32.png) [@bprocket](https://forum.liquibase.org/u/bprocket)\
**Post date:** [August 12, 2022, 5:39pm UTC](https://forum.liquibase.org/t/sqlfile-file-path-wildcards/7181/1 "2022-08-12T17:39:08Z")

</div>

Does the sqlFile change type allow for wildcards for the file path? Is there an example someone can point me at?

It would be useful for executing a very large number of SQL files with exactly the same set of options.

---

<div class="post-metadata">

**Author:** ![daryldoak](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.liquibase.org/daryldoak/32/764_2.png) [@daryldoak](https://forum.liquibase.org/u/daryldoak)\
**Post date:** [August 15, 2022, 3:13pm UTC](https://forum.liquibase.org/t/sqlfile-file-path-wildcards/7181/2 "2022-08-15T15:13:46Z")

</div>

This sounds like a good use case for includeAll:

> **[includeAll | Liquibase Docs](https://docs.liquibase.com/concepts/changelogs/attributes/includeall.html)**
>
> The includeAll tag allows you to specify a directory that contains multiple changelog files. It is used within your root changelog file to call on the directory and include all XML files as changelog files, and all SQL files as individual changes.

---

<div class="post-metadata">

**Author:** ![bprocket](https://avatars.discourse-cdn.com/v4/letter/b/e56c9b/32.png) [@bprocket](https://forum.liquibase.org/u/bprocket)\
**Post date:** [August 15, 2022, 4:06pm UTC](https://forum.liquibase.org/t/sqlfile-file-path-wildcards/7181/3 "2022-08-15T16:06:18Z")

</div>

If I had 100+ SQL files to execute, using the includeAll attribute seems to shift from creating 100+ sqlFile sections in a single changelog to creating 100+ changelog files. I don’t see the benefit in terms of complexity. Why is it easier to create 100+ changelog files than it is to create 100+ sqlFile sections in a single change log file.

I understand it may be difficult for Liquibase to determine the execution order of the SQL files, but I think that could be managed via some sort of file naming, sorting or some other mechanism. It just seems there is unnecessary complexity and tedium.

---

<div class="post-metadata">

**Author:** ![daryldoak](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.liquibase.org/daryldoak/32/764_2.png) [@daryldoak](https://forum.liquibase.org/u/daryldoak)\
**Post date:** [August 15, 2022, 4:16pm UTC](https://forum.liquibase.org/t/sqlfile-file-path-wildcards/7181/4 "2022-08-15T16:16:28Z")

</div>

If you have 100+ SQL files the only thing you need to do is create 1 changelog with the includeAll pointing at the directory where the SQL files are located, no changes are necessary to the SQL Files themselves. The only issue is naming the 100+ SQL files so they execute in the proper sequence.

---

<div class="post-metadata">

**Author:** ![bprocket](https://avatars.discourse-cdn.com/v4/letter/b/e56c9b/32.png) [@bprocket](https://forum.liquibase.org/u/bprocket)\
**Post date:** [August 15, 2022, 6:18pm UTC](https://forum.liquibase.org/t/sqlfile-file-path-wildcards/7181/5 "2022-08-15T18:18:07Z")

</div>

The documentation I found says the includeAll points at a folder containing change logs. I don’t see the option for the sqlFile option. I suppose I’m having difficulty with the documentation. I’ll do more research. Thank you.

---

<div class="post-metadata">

**Author:** ![daryldoak](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.liquibase.org/daryldoak/32/764_2.png) [@daryldoak](https://forum.liquibase.org/u/daryldoak)\
**Post date:** [August 15, 2022, 6:56pm UTC](https://forum.liquibase.org/t/sqlfile-file-path-wildcards/7181/6 "2022-08-15T18:56:45Z")

</div>

Sorry, let me clarify.

I’m suggesting you convert from using sqlFile to using includeAll. IncludeAll does not required “changelog formatting” it can run “raw” SQL files. It will assign the changeset ID and Author as “RAW” and “IncludeAll”.

This may not be exactly the functionality you are looking for. Someone from Liquibase would need to address your original question about adding wildcard functionality. Hope this helps.

---

<div class="post-metadata">

**Author:** ![bprocket](https://avatars.discourse-cdn.com/v4/letter/b/e56c9b/32.png) [@bprocket](https://forum.liquibase.org/u/bprocket)\
**Post date:** [August 16, 2022, 3:55am UTC](https://forum.liquibase.org/t/sqlfile-file-path-wildcards/7181/7 "2022-08-16T03:55:15Z")

</div>

Thanks for clarifying. It helped and I think I have a viable plan.
