In my changelog xml file I have the following
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
<changeSet id="seed_testtest_18" author="me" failOnError="true">
<sqlFile path="dml/seed-data.sql" relativeToChangelogFile="true" />
</changeSet>
</databaseChangeLog>
In the dml/seed-data.sql file I need to use a variable based on spring boot profile that is being used
INSERT INTO ${keyspace}.TESTTEST (ID, NAME, AGE, EMAIL, PHONE) VALUES (14, 'Dennis Vo', 20, 'dennis.n.vo@chase.com', '272-324-8912');
in my application.yml file I have keyspace defined as below
spring:
config:
activate:
on-profile: local
liquibase:
parameters:
keyspace: localkeyspace
However the value of keyspace is not being used when I run the application. Is there anyway to do this when using a sql file?