- CSV requires a schema or data headers.
You can use READ_NOS to ascertain whether headers are present.
- To reduce the volume of data processed in the Advanced SQL Engine, either specify a more specific LOCATION string in the USING clause of the foreign table definition or use PATHPATTERN variables in the SQL statement.
- To ensure that path filtering is applied consistently, Teradata recommends that the database administrator capture path filtering (with appropriate casting of column data types) in a view of the foreign table and make the view available to end users.
- To improve performance of SQL statements with GROUP BY or ORDER BY clauses that include either JSON or CSV files, cast values from their default VARCHAR data type to narrower data types.
- When joining a foreign table to either a relational table or another foreign table, collect statistics on the payload attribute that is used as a join constraint.
- If you generate spool tables, the spool is smaller if you cast values to narrower data types.