private function createCsvFile($type, NodePath $nodePath, &$parentId)
    {
        if (empty($this->csvFiles[$type])) {
            $this->csvFiles[$type] = Table::create(
                $type,
                $this->getHeaders($nodePath, $parentId),
                $this->temp
            );
            $this->csvFiles[$type]->addAttributes(["fullDisplayName" => $type]);
            if (!empty($this->primaryKeys[$type])) {
                $this->csvFiles[$type]->setPrimaryKey($this->primaryKeys[$type]);
            }
        }

        return $this->csvFiles[$type];
    }