Skip to main content

Sample SQL Scripts for AIQ Testing

Sample

--SQL dbvendor=MYSQL
--scripts username=aiq
--should password=thePassword
--demonstrate host=mysqlsmoketest.c7nn5t4czzya.us-west-2.rds.amazonaws.com
--safe, schema=aiq
--repeatable port=3306
--validation limit=21-50
--patterns tag=executions
--for connect
SELECTAIQ *testing. FROMExamples `aiq`.`UTPScenarioExecution`;
--must storeInLocker=
--avoid disconnect
production
data,
destructive statements, and customer-specific credentials.

RedshiftExample hygiene

  • Use
    --placeholder dbvendor=REDSHIFT
    --connection username=theUser
    --values, password=thePassword
    --schema host=sqlclient-test.cqzappbyyyx5.us-east-2.redshift.amazonaws.com
    --names, schema=dev
    --table port=5439
    --names, limit=1-50000
    -- tag=saleswb
    -- connect
    select sellerid, username, (firstname ||' '|| lastname) as name,
    city, sum(qtysold)
    from sales, date, users
    where sales.sellerid = users.userid
    and sales.dateidcredentials.
  • Prefer =read-only date.dateid
    queries unless the article explicitly covers controlled setup or cleanup.
  • Explain expected results, assumptions, and yearfailure =conditions.
  • Include 2008
    transaction or rollback guidance when data changes are required.

Validation workflow

  1. Run scripts in a non-production database first.
  2. Confirm permissions match the intended AIQ execution account.
  3. Review output in AIQ and citydatabase =logs.
  4. Remove 'Sanor Diego'
    group by sellerid, username, name, city
    order by 5 desc;
    -- storeInWhiteboard=
    -- disconnect

Snowflake

-- dbvendor=SNOWFLAKE
-- region=us-west-2
-- account=qrazxhk-kiw37206
-- role=ACCOUNTADMIN
-- username=theUser
-- password=thePassword
-- warehouse=COMPUTE_WH
-- db=APPVANCE
-- schema=AIQ
-- connect
update COUNTRIESobsolete
setexamples COUNTRY_NAME='NAMEthat CHANGED'no
wherelonger COUNTRY_CODE=999;
--match disconnect
current
SQL
testing

MSSQL

-- dbvendor=MSSQL
-- username=theUser
-- password=thePassword
-- host=mssqlsmoketest.c6mn5c3czyyb.us-west-2.rds.amazonaws.com
-- schema=master
-- port=1433
-- connect
call sp_tables;
-- storeInLocker=
-- disconnect

Oracle

-- dbvendor=ORACLE
-- username=theUser
-- password=thePassword
-- host=oraclestest.c4nm5t3czzya.us-west-2.rds.amazonaws.com
-- schema=ORCL
-- port=1521
-- connect
SELECT aiq.getversion() FROM dual;
-- tag=results
-- storeInLocker=
-- disconnect

workflows.

Last updated: SeptemberOctober 19,7, 20242026

If you have any feedback on this topic, please contact us at documentation@appvance.ai