sdv-dev / SDV

Synthetic data generation for tabular data
https://docs.sdv.dev/sdv
Other
2.28k stars 300 forks source link

Invalid Values PII #2139

Closed ldhlong closed 1 month ago

ldhlong commented 1 month ago

Environment details

If you are already running SDV, please indicate the following details about the environment in which you are running it:

Problem description

metadata.update_column( table_name='tabel', column_name='party', sdtype='id', pii=True )

I’m getting “Invalid values ‘(pii)’ forbid column ‘party’ when updating a column I’m using in my multitable synthesizer.

What I already tried

I’ve tried changing the sdtype to other types and no success.

npatki commented 1 month ago

Hi @ldhlong,

There are different properties that you can supply (eg. pii, regex_format, datetime_format, etc.), but it depends on the sdtype. You will receive an error if the combination of sdtype and other properties you provide are not compatible. I would recommend you read through the available resources on our docs website.

For your specific case, you are getting an error because combination of sdtype id and pii is invalid. In this section of the docs, you will see that for sdtype id, the only property you can supply is regex_format.

Example:

metadata.update_column(
  table_name='tabel',
  column_name='party',
  sdtype='id',
  regex_format='[A-Z]{5}'
)
npatki commented 1 month ago

Hi @ldhlong are you still working on this project? I'm closing off this issue since it has been inactive for some time. But feel free to reply if there are any follow-ups and I can always reopen.

If you'd like to discuss a separate topic or have a question about something else, please feel free to file a new issue. Thanks.