The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
One or more tables were defined (alter table...) with primary, unique and foreign key constraints.
A connection is established to a warehouse or lakehouse end point.
When the DatabaseMetadata.getImported/ExportedKeys method is called for a specified table in a schema, no metadata (empty Resultset) is returned. Only DatabaseMetadata.getPrimaryKeys returns constraint metadata for a table.
Is this a known defect?
Changing method reference from primary to exported/imported will result in no metadata.
System.out.println("Get constraints");
int i = 0;
try (ResultSet rsFunctions = dbMeta.getPrimaryKeys("dqm_warehouse", "dbcert", "TCONS3");) {
while (rsFunctions.next()) {
System.out.println(rsFunctions.getString(1) + "." + rsFunctions.getString(2) + "."
+ rsFunctions.getString(3));
++i;
}
}
System.out.println("Constraints found " + i);
User | Count |
---|---|
16 | |
13 | |
8 | |
6 | |
5 |
User | Count |
---|---|
29 | |
24 | |
20 | |
18 | |
13 |