Repository navigation
Closed
Labels
Description
Expected Behavior
Able to run feast apply when there is a hyphen in the project name
Current Behavior
Registered entity year_month_day
Registered feature view serve_weather_features
Deploying infrastructure for serve_weather_features
Traceback (most recent call last):
File "/home/willem/.pyenv/versions/3.7.7/bin/feast", line 33, in <module>
sys.exit(load_entry_point('feast', 'console_scripts', 'feast')())
File "/home/willem/.pyenv/versions/3.7.7/lib/python3.7/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/willem/.pyenv/versions/3.7.7/lib/python3.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/willem/.pyenv/versions/3.7.7/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/willem/.pyenv/versions/3.7.7/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/willem/.pyenv/versions/3.7.7/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/willem/Projects/feast/sdk/python/feast/cli.py", line 163, in apply_total_command
apply_total(repo_config, Path.cwd())
File "/home/willem/Projects/feast/sdk/python/feast/repo_operations.py", line 208, in apply_total
partial=False,
File "/home/willem/Projects/feast/sdk/python/feast/infra/local.py", line 61, in update_infra
f"CREATE TABLE IF NOT EXISTS {_table_id(project, table)} (entity_key BLOB, feature_name TEXT, value BLOB, event_ts timestamp, created_ts timestamp, PRIMARY KEY(entity_key, feature_name))"
sqlite3.OperationalError: near "-": syntax error
Steps to reproduce
Clone https://github.com/dmatrix/mlflow-tests/tree/master/py/delta-lake
Run feast apply
Specifications
- Version: 0.10.3
Possible Solution
The problem is that we don't support hyphens in project names. We should either prevent the use of hyphens or support them at the storage layer.
Activity
dmatrix commentedon May 8, 2021
@woop As you know, SQLite disallows "-" in a table name. For example:
SQLite does not support this at the storage layer, albeit creates the "bug.db" database without a table.
Since the
feast applyuses theproject:<name>table from thefeature_store.yaml, created byfeast init <name>, does it make sense to parse the argument to thefeast init <name>and flag an error, disallowing its usage?Preventing the use of "-" might be an easier workaround early on, during initializing a feast repo, unless you want to support “-“ at both local and remote storage layers.
WDYT?
woop commentedon May 9, 2021
Spot on. It may be easiest to just allow alphanumeric values and underscores in project names as a start. As you say, validation would have to happen during init and also during apply.