How can you use Data Connection to sync a dataset with only a schema and no rows?

321 views Asked by At

I'm looking to create a dataset using Data Connection from a source file that has only a header in it. That is, I want the synced dataset to have a schema but 0 rows. The automatic schema created will not consider the only row provided in the file to be the header. When trying to edit the schema I run into the below error. Is there a workaround so that an empty dataset with only the header can be saved?

The number of skip lines (1) is greater than or equal to the number of rows in the dataset (1).
1

There are 1 answers

0
amy.bananagrams On

You can edit the schema manually, via the dataset details. I would recommend you create a separate dataset, with the same schema and some dummy data. Then use schema inference to generate the Foundry schema for that dataset. You can then copy the resulting schema from that dataset, to the dataset associated with your sync.

As a note, schema inference does consider that only row to be the header, hence the error referring to skipping 1 line. The problem is that with no data, there's nothing to be inferred/no data that can be validated against the schema.