Datameer DAP DB table to get schema details for export job
Hello,
I've a task where I need to build a SQL query based on the field names in an export job. The field names are case sensitive and I need the exact name how it shows when you open the export job.
I can call REST API https://datameer-aws-dev.natinst.com/rest/export-job/<Export-id> to get he list of fields under mapping section. or dap db table SHEETS.record_schema to get the schema structure. However in both methods I've to parse.
Is there a table I can read the individual field names without parsing it
Thanks,
-Trupti
-
Hello Trupti.
At Datameer 7.2 one could get list of column names for a certain Workbook's Sheet from the table sheet_column. Below query will return the list of columns, based on a Workbook's configuration ID and the name of the Sheet you use as an ExportJob source.
SELECT name FROM sheet_column WHERE sheet_fk = (SELECT id FROM sheet WHERE workbook_fk = <Workbook's ConfID> AND name = "<Desired Sheet name>") GROUP BY sheet_column.id;
Hope this is something you are looking for.
Please sign in to leave a comment.
Comments
1 comment