Safe Haskell | None |
---|---|
Language | GHC2024 |
Napkin.Spec.Yaml.Types.Tables
Synopsis
- type SpecProgramForYaml b = SpecProgramReferenceForYaml (SpecProgram b)
- newtype YamlRange a = YamlRange {}
- type BackendMetaConstraints b = (MaybeDefault (YamlBackendTableMeta b), MaybeDefault (YamlBackendViewMeta b), MaybeDefault (YamlBackendMaterializedViewMeta b), FromJSON (YamlBackendTableMeta b), FromJSON (YamlBackendViewMeta b), FromJSON (YamlBackendMaterializedViewMeta b))
- parseTargetType :: BackendMetaConstraints b => Value -> WarningParser (SpecTarget b)
- external :: SpecProgramForYaml b
- data Source
- sql :: BackendMetaConstraints b => SpecProgramForYaml b
- sql_query :: BackendMetaConstraints b => SpecProgramForYaml b
- sql_file :: BackendMetaConstraints b => SpecProgramForYaml b
- sql_with_schema :: Default (BackendTableMeta b) => SpecProgramForYaml b
- sql_file_insert :: Default (BackendTableMeta b) => SpecProgramForYaml b
- copy :: BackendMetaConstraints b => SpecProgramForYaml b
- incremental_by_pk :: (BackendMetaConstraints b, Default (BackendTableMeta b), SqlConcat b) => SpecProgramForYaml b
- incremental_by_time :: (BackendMetaConstraints b, Default (BackendTableMeta b), HasBackendSchemaField b) => SpecProgramForYaml b
- long_to_wide :: BackendMetaConstraints b => SpecProgramForYaml b
- sqlProgram :: forall b (r :: EffectRow). (BackendMetaConstraints b, Members '[Input MetaArguments :: (Type -> Type) -> Type -> Type, Error FatalErrorInfo :: (Type -> Type) -> Type -> Type, RecreateTable b :: (Type -> Type) -> Type -> Type, SqlWrite b :: (Type -> Type) -> Type -> Type, Reader TargetName, SqlParse :: (Type -> Type) -> Type -> Type, LoadQuery :: (Type -> Type) -> Type -> Type] r) => Object -> Source -> WarningParser (Sem r ())
- sourceParser :: Object -> WarningParser Source
Documentation
type SpecProgramForYaml b = SpecProgramReferenceForYaml (SpecProgram b) #
type BackendMetaConstraints b = (MaybeDefault (YamlBackendTableMeta b), MaybeDefault (YamlBackendViewMeta b), MaybeDefault (YamlBackendMaterializedViewMeta b), FromJSON (YamlBackendTableMeta b), FromJSON (YamlBackendViewMeta b), FromJSON (YamlBackendMaterializedViewMeta b)) #
parseTargetType :: BackendMetaConstraints b => Value -> WarningParser (SpecTarget b) #
external :: SpecProgramForYaml b #
Define table with external shell script or command with arguments
external: shell: ./import_table.sh --from "{{{db_url.raw}}}" --table "{{{table.db}}}"
or > external: > command: ./import_table.sh > arguments: > - --from "{{{db_url.raw}}}" > - --table "{{{table.db}}}"
sql :: BackendMetaConstraints b => SpecProgramForYaml b #
sql_query :: BackendMetaConstraints b => SpecProgramForYaml b #
Deprecated: Use more generic sql
instead
DEPRECATED. Define table with SQL query specified directly in YAML
sql_query: query: SELECT * FROM foo
sql_file :: BackendMetaConstraints b => SpecProgramForYaml b #
Deprecated: Use more generic sql
instead
DEPRECATED. Define table with SQL query specified directly in YAML.
vars
is an optional object used to specify variables used in mustache interpolation.
sql_file: source: some_file.sql vars: agg: sum
sql_with_schema :: Default (BackendTableMeta b) => SpecProgramForYaml b #
sql_file_insert :: Default (BackendTableMeta b) => SpecProgramForYaml b #
Insert into a table (or create if non-existent) with SQL query specified directly in YAML. The data is appended to the table, and the table is never truncated.
vars
is an optional object used to specify variables used in mustache interpolation.
sql_file_insert: source: some_file.sql vars: agg: sum
copy :: BackendMetaConstraints b => SpecProgramForYaml b #
Copy a table
copy: table: table_to_be_copied if_exists: append
incremental_by_pk :: (BackendMetaConstraints b, Default (BackendTableMeta b), SqlConcat b) => SpecProgramForYaml b #
incremental_by_time :: (BackendMetaConstraints b, Default (BackendTableMeta b), HasBackendSchemaField b) => SpecProgramForYaml b #
sqlProgram :: forall b (r :: EffectRow). (BackendMetaConstraints b, Members '[Input MetaArguments :: (Type -> Type) -> Type -> Type, Error FatalErrorInfo :: (Type -> Type) -> Type -> Type, RecreateTable b :: (Type -> Type) -> Type -> Type, SqlWrite b :: (Type -> Type) -> Type -> Type, Reader TargetName, SqlParse :: (Type -> Type) -> Type -> Type, LoadQuery :: (Type -> Type) -> Type -> Type] r) => Object -> Source -> WarningParser (Sem r ()) #
sourceParser :: Object -> WarningParser Source #