Uploading individual CSVs as data sources

Hey. I’m just trying to update individual CSVs as data sources. But always the columns type is TEXT. Is there any way to change them? For example, as you can see in the image, I have my age column and it’s an integer column but the type is text. Can I change it? I found an option in the ui but it’s only for queries and it’s not doing the change. Just creates a query and uses convert_to_<type>.

Hi @luisa,

The columns in CSV are text. You can add types using our UI tools which create SQL statements that convert text to other types. You can then save the transformed dataset as a “virtual dataset” (VDS). You can also export a parquet file from this VDS. That will produce a file with defined types for your data.

You can change the type by clicking on the type icon next to the column name:


You can also click on the dropdown arrow to the right of the type.

I’m using the dremio api. Can I create a virtual dataset using the api? Can you indicate me where the documentation is?

This is not what I’m looking for. Because the only thing that it does is generates a query and I’m looking for make a real change of the column.

@luisa Dremio does not modify the data, it will transform the data using queries, which you can save as virtual datasets (similar to views in databases).

Our REST APIs are documented here - creating a virtual dataset is documented here.

Okay. I just uploaded a file. This is the response

How can I create a virtual dataset from a file? Which is the request input? Because I don’t see the file option just space, folder, source and dataset

First you have to promote the file to a dataset (http://docs.dremio.com/rest-api/catalog/post-catalog-id.html) since you need to provide information about the type of the file and for CSV provide the formatting options (delimiter, etc). Then once you have a physical dataset you can create virtual datasets from it.