-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allows naming conventions to be changed #998
Conversation
✅ Deploy Preview for dlt-hub-docs canceled.
|
…ng conventions, fixes how identifiers are normalized in destinations
Other Notes:
|
|
||
@pytest.mark.parametrize( | ||
"destination_config", | ||
destinations_configs(default_sql_configs=True, subset=["postgres", "snowflake"]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should probably filter the tests by loader_file_format in caps and not explicitely in the test header, then all destinations that support csv will automatically be added to this test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
90% of explicit config can be inferred from caps and config interfaces
def test_load_csv( | ||
destination_config: DestinationTestConfiguration, item_type: TestDataItemFormat | ||
) -> None: | ||
os.environ["DATA_WRITER__DISABLE_COMPRESSION"] = "True" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note to self: if I set up those helper functions correctly, we can also easily inspect gzipped files without this setting. ibis / dataframes will make this stuff obsolete anyway because we can use that in the tests in the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sh-rp I did it already for tead_text is fsclient. will push changes thoday
Description
This PR attempts to allow any naming convention to be used (ie UPPER CASE or CamelCase). Until now any naming convention that changed casing of columns was failing. Also destinations have problems when reflecting such columns from information schema.
Fixes following issues
#1470
#964
#1074 (by offering alternative naming convention)
#1085
#860 (most probably, fixture order was messed up)
#1471 (partially, without internal source)
read the commit log for details!
naming conventions:
str
,lower
,upper
)sql_cs
andsql_ci
naming conventions to create case sensitive and insensitive names compatible with SQLduck_case
anddirect
will be unified and will allow any characters in the identifierstodo:
sql_cs
andsql_ci
not yet implemented (but that's trivial)reference:
(4) an overview of case sensitivity and preferred naming convention per destination: https://www.linkedin.com/posts/toby-mao_sql-activity-7170104665412423680-17gv/